diff --git a/test/test-sync-core.cc b/test/test-sync-core.cc
index 6adbfab..fa6eafd 100644
--- a/test/test-sync-core.cc
+++ b/test/test-sync-core.cc
@@ -9,45 +9,16 @@
 
 BOOST_AUTO_TEST_SUITE(SyncCoreTests)
 
-typedef struct
+void callback(const SyncStateMsgPtr &msg)
 {
-  Name deviceName;
-  Name locator;
-  int64_t seq;
-} Result;
-
-Result result1;
-Result result2;
-
-void setResult(const SyncStateMsgPtr &msg, Result &result)
-{
-  if (msg->state_size() > 0)
-  {
-    SyncState state = msg->state(0);
-    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(), strLoc.size());
-    result.seq = state.seq();
-  }
-  else
-  {
-    cout << "Msg state size: " << msg->state_size() << endl;
-  }
+  BOOST_CHECK(msg->state_size() > 0);
 }
 
-void callback1(const SyncStateMsgPtr &msg)
+void checkRoots(const HashPtr &root1, const HashPtr &root2)
 {
-  setResult(msg, result1);
+  BOOST_CHECK_EQUAL(*root1, *root2);
 }
 
-void callback2(const SyncStateMsgPtr &msg)
-{
-  setResult(msg, result2);
-}
-
-
-
 BOOST_AUTO_TEST_CASE(SyncCoreTest)
 {
   string dir = "./SyncCoreTest";
@@ -68,43 +39,37 @@
     remove_all(d);
   }
 
-  SyncCore *core1 = new SyncCore(dir1, user1, loc1, syncPrefix, bind(callback1, _1), c1);
+  SyncCore *core1 = new SyncCore(dir1, user1, loc1, syncPrefix, bind(callback, _1), c1);
   usleep(10000);
-  SyncCore *core2 = new SyncCore(dir2, user2, loc2, syncPrefix, bind(callback2, _1), c2);
+  SyncCore *core2 = new SyncCore(dir2, user2, loc2, syncPrefix, bind(callback, _1), c2);
   usleep(1000000);
-
-  SyncState state;
-
-  HashPtr root1 = core1->root();
-  HashPtr root2 = core2->root();
-  BOOST_CHECK_EQUAL(*root1, *root2);
+  checkRoots(core1->root(), core2->root());
 
   cout << "\n\n\n\n\n\n----------\n";
   core1->updateLocalState(1);
   usleep(100000);
-  BOOST_CHECK_EQUAL(result2.seq, 1);
-  BOOST_CHECK_EQUAL(result2.deviceName, user1);
-  BOOST_CHECK_EQUAL(result2.locator, loc1);
+  checkRoots(core1->root(), core2->root());
+  BOOST_CHECK_EQUAL(core2->seq(user1), 1);
 
   core1->updateLocalState(5);
   usleep(100000);
-  BOOST_CHECK_EQUAL(result2.seq, 5);
+  checkRoots(core1->root(), core2->root());
+  BOOST_CHECK_EQUAL(core2->seq(user1), 5);
 
   core2->updateLocalState(10);
   usleep(100000);
-  BOOST_CHECK_EQUAL(result1.seq, 10);
-  BOOST_CHECK_EQUAL(result1.deviceName, user2);
-  BOOST_CHECK_EQUAL(result1.locator, loc2);
+  checkRoots(core1->root(), core2->root());
+  BOOST_CHECK_EQUAL(core1->seq(user2), 10);
 
   // simple simultaneous data generation
   cout << "\n\n\n\n\n\n----------Simultaneous\n";
   core1->updateLocalState(11);
-  // change the value here 100, 2000, 3000, 5000, each with different error (for 2000 and 3000 run at least 3 times)
   usleep(100);
-  core2->updateLocalState(12);
+  core2->updateLocalState(15);
   usleep(1000000);
-  BOOST_CHECK_EQUAL(result1.seq, 12);
-  BOOST_CHECK_EQUAL(result2.seq, 11);
+  checkRoots(core1->root(), core2->root());
+  BOOST_CHECK_EQUAL(core1->seq(user2), 15);
+  BOOST_CHECK_EQUAL(core2->seq(user1), 11);
 
   // clean the test dir
   if (exists(d))
