sync core works except for simultaneous changes;
that will cause CcnxOperationException in CcnxWrapper;
this is suspicious, not related to sync core's logic
diff --git a/src/ccnx-wrapper.cpp b/src/ccnx-wrapper.cpp
index c818cd2..5580b03 100644
--- a/src/ccnx-wrapper.cpp
+++ b/src/ccnx-wrapper.cpp
@@ -105,6 +105,7 @@
         catch (CcnxOperationException &e)
         {
           // do not try reconnect for now
+          cout << *get_error_info<errmsg_info_str> (e) << endl;
           throw e;
           /*
           m_connected = false;
diff --git a/src/db-helper.cc b/src/db-helper.cc
index 01462c6..0e08612 100644
--- a/src/db-helper.cc
+++ b/src/db-helper.cc
@@ -239,8 +239,6 @@
   const void *name    = sqlite3_value_blob  (argv[0]);
   sqlite3_int64 seqno = sqlite3_value_int64 (argv[1]);
 
-  std::cout << context << ": nameBytes " << nameBytes << " seqno " << seqno << std::endl;
-  
   EVP_DigestUpdate (*hash_context, name, nameBytes);
   EVP_DigestUpdate (*hash_context, &seqno, sizeof(sqlite3_int64));
 }
diff --git a/src/sync-core.cc b/src/sync-core.cc
index 309dd58..6856613 100644
--- a/src/sync-core.cc
+++ b/src/sync-core.cc
@@ -96,12 +96,13 @@
   Bytes syncData;
   msgToBytes(msg, syncData);
   m_handle->publishData(syncName, syncData, FRESHNESS);
+  cout << m_userName << " publishes: " << *oldHash << endl;
 
   // no hurry in sending out new Sync Interest; if others send the new Sync Interest first, no problem, we know the new root hash already;
   // this is trying to avoid the situation that the order of SyncData and new Sync Interest gets reversed at receivers
   ostringstream ss;
   ss << *m_rootHash;
-  TaskPtr task(new OneTimeTask(boost::bind(&SyncCore::sendSyncInterest, this), ss.str(), m_scheduler, 0.05));
+  TaskPtr task(new OneTimeTask(boost::bind(&SyncCore::sendSyncInterest, this), ss.str(), m_scheduler, 0.1));
   m_scheduler->addTask(task);
   sendSyncInterest();
 }
@@ -134,6 +135,7 @@
     // we know the hash, should reply everything
     SyncStateMsgPtr msg = m_log.FindStateDifferences(*(Hash::Origin), *m_rootHash);
     // DEBUG
+    /*
     assert(msg->state_size() > 0);
     int size = msg->state_size();
     int index = 0;
@@ -154,10 +156,12 @@
       }
       index++;
     }
+    */
     // END DEBUG
     Bytes syncData;
     msgToBytes(msg, syncData);
     m_handle->publishData(name, syncData, FRESHNESS);
+    cout << m_userName << " publishes " << hash << endl;
   }
   else
   {
@@ -192,6 +196,7 @@
     ostringstream ss;
     ss << *hash;
     double wait = m_recoverWaitGenerator->nextInterval();
+    cout << m_userName << ", rootHash: " << *m_rootHash << ", hash: " << *hash << endl;
     cout << "recover task scheduled after wait: " << wait << endl;
     TaskPtr task(new OneTimeTask(boost::bind(&SyncCore::recover, this, hash), ss.str(), m_scheduler, wait));
     m_scheduler->addTask(task);
@@ -220,8 +225,9 @@
 void
 SyncCore::handleRecoverData(const Name &name, const Bytes &content)
 {
-  cout << "handle recover data" << endl;
+  //cout << "handle recover data" << endl;
   handleStateData(content);
+  sendSyncInterest();
 }
 
 void
@@ -253,17 +259,17 @@
     SyncState state = msg->state(index);
     string devStr = state.name();
     Name deviceName((const unsigned char *)devStr.c_str(), devStr.size());
-    cout << "Got Name: " << deviceName;
+  //  cout << "Got Name: " << deviceName;
     if (state.type() == SyncState::UPDATE)
     {
       sqlite3_int64 seqno = state.seq();
-      cout << ", Got seq: " << seqno << endl;
+   //   cout << ", Got seq: " << seqno << endl;
       m_log.UpdateDeviceSeqNo(deviceName, seqno);
       if (state.has_locator())
       {
         string locStr = state.locator();
         Name locatorName((const unsigned char *)locStr.c_str(), locStr.size());
-        cout << ", Got loc: " << locatorName << endl;
+    //    cout << ", Got loc: " << locatorName << endl;
         m_log.UpdateLocator(deviceName, locatorName);
         WriteLock(m_ypMutex);
         m_yp[deviceName] = locatorName;
@@ -281,7 +287,7 @@
   HashPtr oldHash = m_rootHash;
   m_rootHash = m_log.RememberStateInStateLog();
   SyncStateMsgPtr diff = m_log.FindStateDifferences(*oldHash, *m_rootHash);
-  cout << "OldHash: " << *oldHash << ", Newhash: " << *m_rootHash << endl;
+
   m_stateMsgCallback(diff);
 }
 
@@ -290,14 +296,15 @@
 {
   Name syncInterest = constructSyncName(m_rootHash);
   m_handle->sendInterest(syncInterest, m_syncClosure);
+  cout << m_userName << " send SYNC interest: " << *m_rootHash << endl;
 }
 
 void
 SyncCore::recover(const HashPtr &hash)
 {
-  cout << "Recover for: " << *hash << endl;
   if (!(*hash == *m_rootHash) && m_log.LookupSyncLog(*hash) <= 0)
   {
+    cout << m_userName << ", Recover for: " << *hash << endl;
     // unfortunately we still don't recognize this hash
     Bytes bytes;
     readRaw(bytes, (const unsigned char *)hash->GetHash(), hash->GetHashBytes());
@@ -306,6 +313,7 @@
     // append the unknown hash
     recoverInterest.appendComp(bytes);
     m_handle->sendInterest(recoverInterest, m_recoverClosure);
+    cout << m_userName << " send RECOVER Interest: " << *hash << endl;
   }
   else
   {
diff --git a/test/database-test.cc b/test/database-test.cc
index c9058e9..016d784 100644
--- a/test/database-test.cc
+++ b/test/database-test.cc
@@ -62,6 +62,10 @@
   hash = db.RememberStateInStateLog ();
   BOOST_CHECK_EQUAL (lexical_cast<string> (*hash), "86b51f1f98662583b295b61385ae4450ff8fac955981f1ca4381144ab1d7a4e0");
 
+  db.UpdateLocator(Name ("Alex"), Name("Hawaii"));
+
+  BOOST_CHECK_EQUAL(db.LookupLocator(Name ("Alex")), Name ("Hawaii"));
+
   
   // db.FindStateDifferences ("00", "95284d3132a7a88b85c5141ca63efa68b7a7daf37315def69e296a0c24692833");
   // db.FindStateDifferences ("86b51f1f98662583b295b61385ae4450ff8fac955981f1ca4381144ab1d7a4e0", "00");
diff --git a/test/test-sync-core.cc b/test/test-sync-core.cc
index d65cafe..5db4eda 100644
--- a/test/test-sync-core.cc
+++ b/test/test-sync-core.cc
@@ -27,7 +27,7 @@
     string strName = state.name();
     result.deviceName = Name((const unsigned char *)strName.c_str(), strName.size());
     string strLoc = state.locator();
-    result.locator = Name((const unsigned char *)strLoc.c_str(), strName.size());
+    result.locator = Name((const unsigned char *)strLoc.c_str(), strLoc.size());
     result.seq = state.seq();
   }
   else
@@ -78,6 +78,8 @@
   HashPtr root1 = core1->root();
   HashPtr root2 = core2->root();
   BOOST_CHECK_EQUAL(*root1, *root2);
+
+  cout << "\n\n\n\n\n\n----------\n";
   core1->updateLocalState(1);
   usleep(100000);
   BOOST_CHECK_EQUAL(result2.seq, 1);