diff --git a/model/sync-logic.cc b/model/sync-logic.cc
index 3bae752..b44c2e8 100644
--- a/model/sync-logic.cc
+++ b/model/sync-logic.cc
@@ -279,6 +279,7 @@
       DiffState diff;
       istringstream ss (dataBuffer);
       ss >> diff;
+      vector<MissingDataInfo> v;
       BOOST_FOREACH (LeafConstPtr leaf, diff.getLeaves().get<ordered>())
         {
           DiffLeafConstPtr diffLeaf = dynamic_pointer_cast<const DiffLeaf> (leaf);
@@ -297,7 +298,12 @@
               if (inserted || updated)
                 {
                   diffLog->update (info, seq);
-                  m_onUpdate (info->toString (), seq, oldSeq);
+                  //m_onUpdate (info->toString (), seq, oldSeq);
+                  MissingDataInfo mdi;
+                  mdi.prefix = info->toString();
+                  mdi.low = oldSeq;
+                  mdi.high = seq;
+                  v.push_back(mdi);
                 }
             }
           else if (diffLeaf->getOperation() == REMOVE)
@@ -314,6 +320,11 @@
             }
         }
 
+      if (!v.empty()) 
+      {
+        m_onUpdate(v);
+      }
+
       insertToDiffLog (diffLog);
     }
   catch (Error::SyncXmlDecodingFailure &e)
@@ -470,7 +481,7 @@
                         bind (&SyncLogic::sendSyncInterest, this),
                         REEXPRESSING_INTEREST);
   
-  m_ccnxHandle->sendInterest (os.str (),
+  m_ccnxHandle->sendInterestForString (os.str (),
                               bind (&SyncLogic::respondSyncData, this, _1, _2));
 }
 
@@ -492,7 +503,7 @@
                             REEXPRESSING_RECOVERY_INTEREST);
     }
 
-  m_ccnxHandle->sendInterest (os.str (),
+  m_ccnxHandle->sendInterestForString (os.str (),
                               bind (&SyncLogic::respondSyncData, this, _1, _2));
 }
 
@@ -502,7 +513,7 @@
 {
   _LOG_TRACE (">> D " << name);
   // sending
-  m_ccnxHandle->publishData (name,
+  m_ccnxHandle->publishStringData (name,
                              lexical_cast<string> (*state),
                              m_syncResponseFreshness); // in NS-3 it doesn't have any effect... yet
 
diff --git a/model/sync-logic.h b/model/sync-logic.h
index e205fc0..daa6e2f 100644
--- a/model/sync-logic.h
+++ b/model/sync-logic.h
@@ -50,6 +50,12 @@
 
 namespace Sync {
 
+struct MissingDataInfo {
+  std::string prefix;
+  SeqNo low;
+  SeqNo high;
+};
+
 /**
  * \ingroup sync
  * @brief A wrapper for SyncApp, which handles ccnx related things (process
@@ -61,7 +67,8 @@
 #endif
 {
 public:
-  typedef boost::function< void ( const std::string &/*prefix*/, const SeqNo &/*newSeq*/, const SeqNo &/*oldSeq*/ ) > LogicUpdateCallback;
+  //typedef boost::function< void ( const std::string &/*prefix*/, const SeqNo &/*newSeq*/, const SeqNo &/*oldSeq*/ ) > LogicUpdateCallback;
+  typedef boost::function< void (const std::vector<MissingDataInfo> & ) > LogicUpdateCallback;
   typedef boost::function< void ( const std::string &/*prefix*/ ) > LogicRemoveCallback;
 
   /**
diff --git a/model/sync-seq-no.h b/model/sync-seq-no.h
index 5dbe490..4f84482 100644
--- a/model/sync-seq-no.h
+++ b/model/sync-seq-no.h
@@ -122,6 +122,26 @@
   }
 
   bool
+  operator <= (const SeqNo &seq) const
+  {
+    return m_session <= seq.m_session || (m_session == seq.m_session && m_seq <= seq.m_seq);
+  }
+
+  SeqNo &
+  operator ++ ()
+  {
+    m_seq ++;
+    return *this;
+  }
+
+  SeqNo &
+  operator --()
+  {
+    m_seq --;
+    return *this;
+  }
+
+  bool
   isValid () const
   {
     return m_valid;
