diff --git a/model/sync-app-data-fetch.cc b/model/sync-app-data-fetch.cc
index 2680859..af696e2 100644
--- a/model/sync-app-data-fetch.cc
+++ b/model/sync-app-data-fetch.cc
@@ -19,3 +19,23 @@
  *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
  *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
+
+#include "sync-app-data-fetch.h"
+
+using namespace std;
+using namespace boost;
+
+namespace Sync
+{
+
+void AppDataFetch::fetch(string prefix, uint32_t startSeq, uint32_t endSeq)
+{
+  for (uint32_t i = startSeq; i <= endSeq; i++)
+  {
+    string interestName = prefix;
+    interestName += i;
+    m_ccnxHandle->sendInterest(interestName, m_dataCallback);
+  }
+}
+
+}
\ No newline at end of file
diff --git a/model/sync-app-data-fetch.h b/model/sync-app-data-fetch.h
index c52d55b..70b54cb 100644
--- a/model/sync-app-data-fetch.h
+++ b/model/sync-app-data-fetch.h
@@ -39,11 +39,12 @@
 	/**
 	 * @param dataCallback the callback function to process data
 	 */
-	AppDataFetch(boost::function<void (boost::shared_ptr<DataBuffer>)>
-	dataCallback);
+	AppDataFetch(boost::shared_ptr<CcnxWrapper> ccnxHandle,
+		     boost::function<void (std::string)> dataCallback)
+	{ m_ccnxHandle = ccnxHandle; m_dataCallback = dataCallback; }
 
-	void setDataCallback(boost::function<void (boost::shared_ptr<DataBuffer>)>
-	dataCallback) {m_dataCallback = dataCallback;}
+	void setDataCallback(boost::function<void (std::string)> dataCallback)
+	{ m_dataCallback = dataCallback; }
 
 	/**
 	 * @brief fetch data for a certain name prefix
@@ -52,12 +53,11 @@
 	 * @param startSeq the start of sequence number range (inclusive)
 	 * @param endSeq the end of sequence number range (inclusive)
 	 */
-	void fetch(string prefix, long startSeq, long endSeq);
+	void fetch(std::string prefix, uint32_t startSeq, uint32_t endSeq);
 
 private:
-	boost::shared_ptr<CcnxWrapper> ccnxHandle;
-	boost::shared_ptr<boost::function<void (boost::shared_ptr<DataBuffer>)>
-	m_dataCallback;
+	boost::shared_ptr<CcnxWrapper> m_ccnxHandle;
+	boost::function<void (std::string)> m_dataCallback;
 };
 
 
diff --git a/model/sync-app-data-publish.cc b/model/sync-app-data-publish.cc
index 2680859..a3347b8 100644
--- a/model/sync-app-data-publish.cc
+++ b/model/sync-app-data-publish.cc
@@ -19,3 +19,49 @@
  *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
  *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
+
+#include "sync-app-data-publish.h"
+
+using namespace std;
+using namespace boost;
+
+namespace Sync
+{
+
+pair<string, string> AppDataPublish::getRecentData(string prefix)
+{
+
+}
+
+uint32_t AppDataPublish::getHighestSeq(string prefix)
+{
+  unordered_map<string, uint32_t>::iterator i = m_sequenceLog.find(prefix);
+
+  if (i != m_sequenceLog.end())
+  {
+    return i->second;
+  }
+  else
+  {
+    m_sequenceLog[prefix] = 0;
+    return 0;
+  }
+
+}
+
+bool AppDataPublish::publishData(string name, string dataBuffer, int freshness)
+{
+  uint32_t seq = getHighestSeq(name) + 1;
+  string contentName = name;
+
+  contentName += seq;
+
+  m_sequenceLog[contentName] = seq;
+  m_recentData[contentName] = dataBuffer;
+
+  m_ccnxHandle->publishData(contentName, dataBuffer, freshness);
+
+  return true;
+}
+
+}
\ No newline at end of file
diff --git a/model/sync-app-data-publish.h b/model/sync-app-data-publish.h
index 2031532..f02a188 100644
--- a/model/sync-app-data-publish.h
+++ b/model/sync-app-data-publish.h
@@ -23,6 +23,7 @@
 #ifndef SYNC_APP_DATA_PUBLISH_H
 #define SYNC_APP_DATA_PUBLISH_H
 #include <boost/shared_ptr.hpp>
+#include <boost/unordered_map.hpp>
 #include "sync-ccnx-wrapper.h"
 
 /**
@@ -35,29 +36,29 @@
 /**
  * \ingroup sync
  * @brief publishes application data using incrementing sequence number (for
- * each sequence namber and keeps track of most recently published data for 
+ * each sequence namber and keeps track of most recently published data for
  * each name prefix
  */
 class AppDataPublish
 {
 public:
-	AppDataPublish();
+	AppDataPublish(boost::shared_ptr<CcnxWrapper> ccnxHandle)
+	{ m_ccnxHandle = ccnxHandle; }
 	~AppDataPublish() {};
 
 	/**
 	 * @brief get the name (including sequence number) and the content
 	 * (unencoded, just XML stanza) of the most recent published data
 	 *
-	 * @param prefix the name prefix to look for 
+	 * @param prefix the name prefix to look for
 	 * @return the pair of name and content
 	 */
-	std::pair<std::string, boost::shared_ptr<const DataBuffer> >
-	getRecentData(std::string prefix);
+	std::pair<std::string, std::string> getRecentData(std::string prefix);
 
 	/**
 	 * brief get the most recent sequence number for a name prefix
 	 */
-	 long getHighestSeq(std:string prefix);
+	 u_int32_t getHighestSeq(std::string prefix);
 
 	/**
 	 * @brief publish data for a name prefix, updates the corresponding
@@ -68,13 +69,12 @@
 	 * @param freshness the freshness for the data object
 	 * @return whether the publish succeeded
 	 */
-	bool publishData(std::string name, boost::shared_ptr<DataBufer> dataBuffer,
-	int freshness);
-  
+	bool publishData(std::string name, std::string dataBuffer, int freshness);
+
 private:
-	boost::unordered_map<string, long> m_sequenceLog;
+	boost::unordered_map<std::string, uint32_t> m_sequenceLog;
 	boost::shared_ptr<CcnxWrapper> m_ccnxHandle;
-	std::pair<std::string, boost::shared_ptr<DataBuffer> > m_recentData;
+	boost::unordered_map<std::string, std::string> m_recentData;
 };
 
 } // Sync
