diff --git a/model/sync-interest-table.cc b/model/sync-interest-table.cc
index 0ec430c..b9f6484 100644
--- a/model/sync-interest-table.cc
+++ b/model/sync-interest-table.cc
@@ -28,52 +28,85 @@
 namespace Sync
 {
 
-vector<string> SyncInterestTable::fetchAll()
+SyncInterestTable::SyncInterestTable ()
+  : m_running (true)
 {
-	expireInterests();
-
-	recursive_mutex::scoped_lock lock(m_mutex);
-	vector<string> entries;
-	for (unordered_map<string, time_t>::iterator it = m_table.begin(); it !=
-		m_table.end(); ++it) {
-		entries.push_back(it->first);
-	}
-	m_table.clear();
-
-	return entries;
+  m_thread = thread (&SyncInterestTable::periodicCheck, this);
 }
 
-bool SyncInterestTable::insert(string interest)
+SyncInterestTable::~SyncInterestTable ()
 {
-	recursive_mutex::scoped_lock lock(m_mutex);
-	unordered_map<string, time_t>::iterator it = m_table.find(interest);
-	if (it != m_table.end())
-		m_table.erase(it);
-	time_t currentTime = time(0);
-	m_table.insert(make_pair(interest, currentTime));
+  // cout << "request interrupt: " << this_thread::get_id () << endl;
+  m_running = false;
+  m_thread.interrupt ();
+  m_thread.join ();
 }
 
-SyncInterestTable::SyncInterestTable() {
-	m_thread = thread(&SyncInterestTable::periodicCheck, this);
+vector<string>
+SyncInterestTable::fetchAll ()
+{
+  expireInterests();
+
+  recursive_mutex::scoped_lock lock (m_mutex);
+  
+  vector<string> entries;
+  for (unordered_map<string, time_t>::iterator it = m_table.begin();
+       it != m_table.end();
+       ++it)
+    {
+      entries.push_back(it->first);
+    }
+  m_table.clear ();
+
+  return entries;
 }
 
-void SyncInterestTable::expireInterests() {
-	recursive_mutex::scoped_lock lock(m_mutex);
-	time_t currentTime = time(0);
-	unordered_map<string, time_t>::iterator it = m_table.begin(); 
-	while(it != m_table.end()) {
-		time_t timestamp = it->second;
-		if (currentTime - timestamp > m_checkPeriod) {
-			it = m_table.erase(it);
-		}
-		else
-			++it;
-	}
+bool
+SyncInterestTable::insert(string interest)
+{
+  recursive_mutex::scoped_lock lock (m_mutex);
+  TableContainer::iterator it = m_table.find (interest);
+  if (it != m_table.end())
+    m_table.erase(it);
+  time_t currentTime = time(0);
+  m_table.insert (make_pair(interest, currentTime));
 }
 
-void SyncInterestTable::periodicCheck() {
-	sleep(4);
-	expireInterests();
+void SyncInterestTable::expireInterests()
+{
+  recursive_mutex::scoped_lock lock (m_mutex);
+  time_t currentTime = time(0);
+  TableContainer::iterator it = m_table.begin (); 
+  while (it != m_table.end())
+    {
+    time_t timestamp = it->second;
+    if (currentTime - timestamp > m_checkPeriod) {
+      it = m_table.erase(it);
+    }
+    else
+      ++it;
+  }
+}
+
+void SyncInterestTable::periodicCheck ()
+{
+  while (m_running)
+    {
+      try
+        {
+          // cout << "enterSleep: " << this_thread::get_id () << endl;
+      
+          this_thread::sleep (posix_time::seconds(4));
+          expireInterests ();
+        }
+      catch (boost::thread_interrupted e)
+        {
+          // should I just assign m_running = false here?
+          
+          // cout << "interrupted: " << this_thread::get_id () << endl;
+          // do nothing
+        }
+    }
 }
 
 }
diff --git a/model/sync-interest-table.h b/model/sync-interest-table.h
index f850708..bc5f2c2 100644
--- a/model/sync-interest-table.h
+++ b/model/sync-interest-table.h
@@ -30,11 +30,6 @@
 #include <boost/thread/thread.hpp>
 #include <ctime>
 
-/**
- * \defgroup sync SYNC protocol
- *
- * Implementation of SYNC protocol
- */
 namespace Sync {
 
 /**
@@ -46,32 +41,38 @@
 class SyncInterestTable
 {
 public:
-	SyncInterestTable();
+  SyncInterestTable ();
+  ~SyncInterestTable ();
 
-	/**
-	 * @brief Insert an interest, if interest already exists, update the
-	 * timestamp
-	 */
-	bool insert(std::string interest);
+  /**
+   * @brief Insert an interest, if interest already exists, update the
+   * timestamp
+   */
+  bool insert (std::string interest);
 
-	/**
-	 * @brief fetch all Interests and clear the table
-	 */
-	std::vector<std::string> fetchAll();
+  /**
+   * @brief fetch all Interests and clear the table
+   */
+  std::vector<std::string>
+  fetchAll ();
 
 private:
-	/**
-	 * @brief periodically called to expire Interest
-	 */
-	void expireInterests();
+  /**
+   * @brief periodically called to expire Interest
+   */
+  void expireInterests ();
 
-	void periodicCheck();
+  void periodicCheck ();
 
 private:
-	static const int m_checkPeriod = 4;
-	boost::unordered_map<std::string, time_t> m_table; // pit entries
-	boost::thread m_thread; // thread to check every 4 sec
-	boost::recursive_mutex m_mutex;
+  typedef boost::unordered_map<std::string, time_t> TableContainer;
+  
+  static const int m_checkPeriod = 4;
+  TableContainer m_table; // pit entries
+  
+  boost::thread m_thread; // thread to check every 4 sec
+  volatile bool m_running;
+  boost::recursive_mutex m_mutex;
 
 };
 
diff --git a/test/test_data_fetch_and_publish.cc b/test/test_data_fetch_and_publish.cc
index 1f9d7fe..b227572 100644
--- a/test/test_data_fetch_and_publish.cc
+++ b/test/test_data_fetch_and_publish.cc
@@ -37,74 +37,74 @@
 
 class TestStructApp {
 public:
-	map<string, string> data;
-	void set(string str1, string str2) {
-		data.insert(make_pair(str1, str2));
-	}
+  map<string, string> data;
+  void set(string str1, string str2) {
+    data.insert(make_pair(str1, str2));
+  }
 
-	void erase(string str1, string str2) {
-		data.erase(str1);
-	}
+  void erase(string str1, string str2) {
+    data.erase(str1);
+  }
 
-	string toString(){
-		map<string, string>::iterator it = data.begin(); 
-		string str = "";
-		for (; it != data.end(); ++it){
-			str += "<";
-			str += it->first;
-			str += "|";
-			str += it->second;
-			str += ">";
-		}
-		return str;
-	}
+  string toString(){
+    map<string, string>::iterator it = data.begin(); 
+    string str = "";
+    for (; it != data.end(); ++it){
+      str += "<";
+      str += it->first;
+      str += "|";
+      str += it->second;
+      str += ">";
+    }
+    return str;
+  }
 
 };
 
 BOOST_AUTO_TEST_CASE (AppDataPublishAndFetchTest)
 {
-	TestStructApp foo;
-	TestStructApp bar;
+  TestStructApp foo;
+  TestStructApp bar;
 	
-	string interest = "/april/fool";
-	string seq[5] = {"1", "2", "3", "4", "5"};
-	string str[5] = {"panda", "express", "tastes", "so", "good"};
+  string interest = "/april/fool";
+  string seq[5] = {"1", "2", "3", "4", "5"};
+  string str[5] = {"panda", "express", "tastes", "so", "good"};
 
-	for (int i = 0; i < 5; i++) {
-		foo.set(interest + "/" + seq[i], str[i]);
-	}
+  for (int i = 0; i < 5; i++) {
+    foo.set(interest + "/" + seq[i], str[i]);
+  }
 
-	boost::function<void (string, string)> setFunc =
-	bind(&TestStructApp::set, &bar, _1, _2);
+  boost::function<void (string, string)> setFunc =
+    bind(&TestStructApp::set, &bar, _1, _2);
 
-	shared_ptr<CcnxWrapper> handle(new CcnxWrapper());
+  shared_ptr<CcnxWrapper> handle(new CcnxWrapper());
 
-	AppDataFetch fetcher(handle, setFunc);
-	AppDataPublish publisher(handle);
+  AppDataFetch fetcher(handle, setFunc);
+  AppDataPublish publisher(handle);
 
-	for (int i = 1; i <= 5; i++) {
-		publisher.publishData(interest, 0, str[i - 1], 5);
-	}
+  for (int i = 1; i <= 5; i++) {
+    publisher.publishData(interest, 0, str[i - 1], 5);
+  }
 
-	BOOST_CHECK_EQUAL(publisher.getHighestSeq(interest, 0), 5);
-	BOOST_CHECK_EQUAL(publisher.getRecentData(interest, 0), str[4]);
+  BOOST_CHECK_EQUAL(publisher.getHighestSeq(interest, 0), 5);
+  BOOST_CHECK_EQUAL(publisher.getRecentData(interest, 0), str[4]);
 
-	fetcher.fetch(interest, 1, 5);
-	// give time for ccnd to react
-	sleep(1);
-	BOOST_CHECK_EQUAL(foo.toString(), bar.toString());
+  fetcher.fetch(interest, 1, 5);
+  // give time for ccnd to react
+  sleep(1);
+  BOOST_CHECK_EQUAL(foo.toString(), bar.toString());
 
 
-	boost::function<void (string, string)> eraseFunc =
-	bind(&TestStructApp::erase, &bar, _1, _2);
-	fetcher.setDataCallback(eraseFunc);
+  boost::function<void (string, string)> eraseFunc =
+    bind(&TestStructApp::erase, &bar, _1, _2);
+  fetcher.setDataCallback(eraseFunc);
 
-	fetcher.fetch(interest, 1, 5);
-	// give time for ccnd to react
-	sleep(1);
-	TestStructApp poo;
+  fetcher.fetch(interest, 1, 5);
+  // give time for ccnd to react
+  sleep(1);
+  TestStructApp poo;
 
-	BOOST_CHECK_EQUAL(poo.toString(), bar.toString());
+  BOOST_CHECK_EQUAL(poo.toString(), bar.toString());
 
 }
 
diff --git a/test/test_interest_table.cc b/test/test_interest_table.cc
new file mode 100644
index 0000000..4d9a29d
--- /dev/null
+++ b/test/test_interest_table.cc
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include <boost/test/unit_test.hpp>
+#include <boost/test/output_test_stream.hpp> 
+#include <map>
+using boost::test_tools::output_test_stream;
+
+#include <boost/make_shared.hpp>
+
+#include "../model/sync-interest-table.h"
+#include "../model/sync-app-data-fetch.h"
+#include "../model/sync-app-data-publish.h"
+
+using namespace Sync;
+using namespace std;
+using namespace boost;
+
+BOOST_AUTO_TEST_CASE (InterestTableTest)
+{
+  SyncInterestTable *table = 0;
+  BOOST_CHECK_NO_THROW (table = new SyncInterestTable ());
+
+  BOOST_CHECK_NO_THROW (delete table);
+}
+
