diff --git a/ns3/sync-ccnx-wrapper.cc b/ns3/sync-ccnx-wrapper.cc
new file mode 100644
index 0000000..e66bda1
--- /dev/null
+++ b/ns3/sync-ccnx-wrapper.cc
@@ -0,0 +1,255 @@
+/* -*- 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 "sync-ccnx-wrapper.h"
+#include "sync-log.h"
+#include <boost/throw_exception.hpp>
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/lambda/bind.hpp>
+
+namespace ll = boost::lambda;
+
+#include <ns3/ccnx-name-components.h>
+#include <ns3/ccnx-interest-header.h>
+#include <ns3/ccnx-content-object-header.h>
+#include <ns3/ccnx-face.h>
+#include <ns3/packet.h>
+#include <ns3/ccnx-fib.h>
+
+typedef boost::error_info<struct tag_errmsg, std::string> errmsg_info_str;
+typedef boost::error_info<struct tag_errmsg, int> errmsg_info_int;
+
+using namespace std;
+using namespace boost;
+using namespace ns3;
+
+INIT_LOGGER ("CcnxWrapper");
+
+namespace Sync {
+
+CcnxWrapper::CcnxWrapper()
+{
+}
+
+CcnxWrapper::~CcnxWrapper()
+{
+}
+
+void
+CcnxWrapper::StartApplication ()
+{
+  CcnxApp::StartApplication ();
+}
+
+void
+CcnxWrapper::StopApplication ()
+{
+  CcnxApp::StopApplication ();
+}
+
+int
+CcnxWrapper::publishData (const string &dataName, const string &dataBuffer, int freshness)
+{
+  // NS_LOG_INFO ("Requesting Interest: \n" << interestHeader);
+  _LOG_INFO ("> Data for " << dataName);
+
+  Ptr<CcnxNameComponents> name = Create<CcnxNameComponents> ();
+  istringstream is (dataName);
+  is >> *name;
+
+  static CcnxContentObjectTail trailer;
+  
+  CcnxContentObjectHeader data;
+  data.SetName (name);
+  data.SetFreshness (Seconds (freshness));
+
+  Ptr<Packet> packet = Create<Packet> (reinterpret_cast<const uint8_t*> (dataBuffer.c_str ()), dataBuffer.size ());
+  
+  packet->AddHeader (data);
+  packet->AddTrailer (trailer);
+
+  m_protocolHandler (packet);
+
+  m_transmittedContentObjects (&data, packet, this, m_face);
+
+  return 0;
+}
+
+int CcnxWrapper::sendInterest (const string &strInterest, const DataCallback &dataCallback)
+{
+  // NS_LOG_INFO ("Requesting Interest: \n" << interestHeader);
+  _LOG_INFO ("> Interest for " << strInterest);
+
+  Ptr<CcnxNameComponents> name = Create<CcnxNameComponents> ();
+  istringstream is (strInterest);
+  is >> *name;
+  
+  CcnxInterestHeader interestHeader;
+  interestHeader.SetNonce            (m_rand.GetValue ());
+  interestHeader.SetName             (name);
+  interestHeader.SetInterestLifetime (Seconds (4.0));
+
+  Ptr<Packet> packet = Create<Packet> ();
+  packet->AddHeader (interestHeader);
+
+  m_protocolHandler (packet);
+
+  m_transmittedInterests (&interestHeader, this, m_face);
+
+  // Record the callback
+  CcnxFilterEntryContainer<DataCallback>::type::iterator entry = m_dataCallbacks.find (*name);
+  if (entry == m_dataCallbacks.end ())
+    {
+      pair<CcnxFilterEntryContainer<DataCallback>::type::iterator, bool> status =
+        m_dataCallbacks.insert (CcnxFilterEntry<DataCallback> (name));
+
+      entry = status.first;
+    }
+  m_dataCallbacks.modify (entry, ll::bind (&CcnxFilterEntry<DataCallback>::AddCallback, ll::_1, dataCallback));
+  
+  return 0;
+}
+
+int CcnxWrapper::setInterestFilter (const string &prefix, const InterestCallback &interestCallback)
+{
+  Ptr<CcnxNameComponents> name = Create<CcnxNameComponents> ();
+  istringstream is (prefix);
+  is >> *name;
+
+  CcnxFilterEntryContainer<InterestCallback>::type::iterator entry = m_interestCallbacks.find (*name);
+  if (entry == m_interestCallbacks.end ())
+    {
+      pair<CcnxFilterEntryContainer<InterestCallback>::type::iterator, bool> status =
+        m_interestCallbacks.insert (CcnxFilterEntry<InterestCallback> (name));
+
+      entry = status.first;
+    }
+
+  m_interestCallbacks.modify (entry, ll::bind (&CcnxFilterEntry<InterestCallback>::AddCallback, ll::_1, interestCallback));
+
+  // creating actual face
+  
+  Ptr<CcnxFib> fib = GetNode ()->GetObject<CcnxFib> ();
+  CcnxFibEntryContainer::type::iterator fibEntry = fib->Add (*name, m_face, 0);
+
+  // make face green, so it will be used primarily
+  fib->m_fib.modify (fibEntry,
+                     ll::bind (&CcnxFibEntry::UpdateStatus,
+                               ll::_1, m_face, CcnxFibFaceMetric::NDN_FIB_GREEN));
+
+  return 0;
+}
+
+void
+CcnxWrapper::clearInterestFilter (const std::string &prefix)
+{
+  Ptr<CcnxNameComponents> name = Create<CcnxNameComponents> ();
+  istringstream is (prefix);
+  is >> *name;
+
+  CcnxFilterEntryContainer<InterestCallback>::type::iterator entry = m_interestCallbacks.find (*name);
+  if (entry == m_interestCallbacks.end ())
+    return;
+
+  m_interestCallbacks.modify (entry, ll::bind (&CcnxFilterEntry<InterestCallback>::ClearCallback, ll::_1));  
+}
+
+CcnxFilterEntryContainer<CcnxWrapper::InterestCallback>::type::iterator
+CcnxWrapper::InterestCallbackLookup (const ns3::CcnxNameComponents &name)
+{
+  CcnxFilterEntryContainer<InterestCallback>::type::iterator entry = m_interestCallbacks.end ();
+
+  // do the longest prefix match
+  for (size_t componentsCount = name.GetComponents ().size ()+1;
+       componentsCount > 0;
+       componentsCount--)
+    {
+      CcnxNameComponents subPrefix (name.GetSubComponents (componentsCount-1));
+
+      entry = m_interestCallbacks.find (subPrefix);
+      if (entry != m_interestCallbacks.end())
+        return entry;
+    }
+
+  return entry;
+}
+
+CcnxFilterEntryContainer<CcnxWrapper::DataCallback>::type::iterator
+CcnxWrapper::DataCallbackLookup (const ns3::CcnxNameComponents &name)
+{
+  CcnxFilterEntryContainer<DataCallback>::type::iterator entry = m_dataCallbacks.end ();
+
+  // do the longest prefix match
+  for (size_t componentsCount = name.GetComponents ().size ()+1;
+       componentsCount > 0;
+       componentsCount--)
+    {
+      CcnxNameComponents subPrefix (name.GetSubComponents (componentsCount-1));
+
+      entry = m_dataCallbacks.find (subPrefix);
+      if (entry != m_dataCallbacks.end())
+        return entry;
+    }
+
+  return entry;  
+}
+
+void
+CcnxWrapper::OnInterest (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet)
+{
+  CcnxApp::OnInterest (interest, packet);
+
+  CcnxFilterEntryContainer<InterestCallback>::type::iterator entry = InterestCallbackLookup (interest->GetName ());
+  if (entry == m_interestCallbacks.end ())
+    {
+      _LOG_DEBUG ("No Interest callback set");
+      return;
+    }
+  
+  entry->m_callback (lexical_cast<string> (interest->GetName ()));  
+}
+
+void
+CcnxWrapper::OnContentObject (const Ptr<const CcnxContentObjectHeader> &contentObject,
+                              Ptr<Packet> payload)
+{
+  CcnxApp::OnContentObject (contentObject, payload);
+
+  CcnxFilterEntryContainer<DataCallback>::type::iterator entry = DataCallbackLookup (contentObject->GetName ());
+  if (entry == m_dataCallbacks.end ())
+    {
+      _LOG_DEBUG ("No Data callback set");
+      return;
+    }
+
+  ostringstream content;
+  payload->CopyData (&content, payload->GetSize ());
+  
+  entry->m_callback (lexical_cast<string> (contentObject->GetName ()), content.str ());
+  
+  // i guess it make sense to remove callback when interest is satisfied
+  m_dataCallbacks.erase (entry);
+}
+
+
+}
diff --git a/ns3/sync-ccnx-wrapper.h b/ns3/sync-ccnx-wrapper.h
new file mode 100644
index 0000000..5776c1a
--- /dev/null
+++ b/ns3/sync-ccnx-wrapper.h
@@ -0,0 +1,195 @@
+/* -*- 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>
+ */
+
+#ifndef SYNC_CCNX_WRAPPER_H
+#define SYNC_CCNX_WRAPPER_H
+
+#include <boost/exception/all.hpp>
+#include <boost/function.hpp>
+#include <string>
+
+#include <ns3/ptr.h>
+#include <ns3/node.h>
+#include <ns3/random-variable.h>
+#include <ns3/ccnx-app.h>
+#include <ns3/ccnx-name-components.h>
+#include <ns3/hash-helper.h>
+
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/hashed_index.hpp>
+#include <boost/multi_index/mem_fun.hpp>
+
+/**
+ * \defgroup sync SYNC protocol
+ *
+ * Implementation of SYNC protocol
+ */
+namespace Sync {
+
+template<class Callback>
+struct CcnxFilterEntry
+{
+public:
+  CcnxFilterEntry (ns3::Ptr<const ns3::CcnxNameComponents> prefix)
+    : m_prefix (prefix)
+  { }
+  
+  const ns3::CcnxNameComponents &
+  GetPrefix () const
+  { return *m_prefix; }
+
+  void
+  AddCallback (Callback callback)
+  { 
+    m_callback = callback;
+  }
+
+  void
+  ClearCallback ()
+  {
+    m_callback = 0;
+  }
+  
+public:
+  ns3::Ptr<const ns3::CcnxNameComponents> m_prefix; ///< \brief Prefix of the PIT entry
+  Callback m_callback;
+};
+
+
+template<class Callback>
+struct CcnxFilterEntryContainer
+{
+  typedef
+  boost::multi_index::multi_index_container<
+    CcnxFilterEntry<Callback>,
+    boost::multi_index::indexed_by<
+      // indexed by hash
+      boost::multi_index::hashed_unique<
+        boost::multi_index::const_mem_fun< CcnxFilterEntry<Callback>, const ns3::CcnxNameComponents&, &CcnxFilterEntry<Callback>::GetPrefix >,
+        ns3::CcnxPrefixHash
+        >
+      >
+    > type;
+};
+
+
+
+struct CcnxOperationException : virtual boost::exception, virtual std::exception { };
+/**
+ * \ingroup sync
+ * @brief A wrapper for ccnx library; clients of this code do not need to deal
+ * with ccnx library
+ */
+class CcnxWrapper
+  : public ns3::CcnxApp
+{
+public:
+  typedef boost::function<void (std::string, std::string)> DataCallback;
+  typedef boost::function<void (std::string)> InterestCallback;
+  
+  /**
+   * @brief initialize the wrapper; a lot of things needs to be done. 1) init
+   * keystore 2) init keylocator 3) start a thread to hold a loop of ccn_run
+   *
+   */
+  CcnxWrapper();
+  ~CcnxWrapper();
+
+  // from CcnxApp
+  /**
+   * @brief Should be called after Node pointer is set to create face and start application
+   */
+  virtual void
+  StartApplication ();
+
+  /**
+   * @brief Stop application
+   */
+  virtual void
+  StopApplication ();
+
+  /**
+   * @brief send Interest; need to grab lock m_mutex first
+   *
+   * @param strInterest the Interest name
+   * @param dataCallback the callback function to deal with the returned data
+   * @return the return code of ccn_express_interest
+   */
+  int
+  sendInterest (const std::string &strInterest, const DataCallback &dataCallback);
+
+  /**
+   * @brief set Interest filter (specify what interest you want to receive)
+   *
+   * @param prefix the prefix of Interest
+   * @param interestCallback the callback function to deal with the returned data
+   * @return the return code of ccn_set_interest_filter
+   */
+  int
+  setInterestFilter (const std::string &prefix, const InterestCallback &interestCallback);
+
+  /**
+   * @brief clear Interest filter
+   * @param prefix the prefix of Interest
+   */
+  void
+  clearInterestFilter (const std::string &prefix);
+
+  /**
+   * @brief publish data and put it to local ccn content store; need to grab
+   * lock m_mutex first
+   *
+   * @param name the name for the data object
+   * @param dataBuffer the data to be published
+   * @param freshness the freshness time for the data object
+   * @return code generated by ccnx library calls, >0 if success
+   */
+  int
+  publishData (const std::string &name, const std::string &dataBuffer, int freshness);
+
+  // from CcnxApp
+  virtual void
+  OnInterest (const ns3::Ptr<const ns3::CcnxInterestHeader> &interest, ns3::Ptr<ns3::Packet> packet);
+ 
+  virtual void
+  OnContentObject (const ns3::Ptr<const ns3::CcnxContentObjectHeader> &contentObject,
+                   ns3::Ptr<ns3::Packet> payload);
+
+private:
+  CcnxFilterEntryContainer<InterestCallback>::type::iterator
+  InterestCallbackLookup (const ns3::CcnxNameComponents &name);
+
+  CcnxFilterEntryContainer<DataCallback>::type::iterator
+  DataCallbackLookup (const ns3::CcnxNameComponents &name);
+
+private:
+  ns3::UniformVariable m_rand; // nonce generator
+
+  CcnxFilterEntryContainer<DataCallback>::type m_dataCallbacks;
+  CcnxFilterEntryContainer<InterestCallback>::type m_interestCallbacks;
+};
+
+typedef boost::shared_ptr<CcnxWrapper> CcnxWrapperPtr;
+
+} // Sync
+
+#endif // SYNC_CCNX_WRAPPER_H
diff --git a/ns3/sync-log.h b/ns3/sync-log.h
index 9ab4843..6dbc930 100644
--- a/ns3/sync-log.h
+++ b/ns3/sync-log.h
@@ -23,6 +23,24 @@
 #ifndef SYNC_LOG_H
 #define SYNC_LOG_H
 
+#ifdef NS3_MODULE
+
+#include <ns3/log.h>
+
+#define INIT_LOGGER(name) NS_LOG_COMPONENT_DEFINE(name);
+
+#define _LOG_INFO(x) NS_LOG_INFO(x)
+
+#define _LOG_DEBUG(x) NS_LOG_DEBUG(x)
+
+#define _LOG_TRACE(x) NS_LOG_LOGIC(x)
+
+#define _LOG_FUNCTION(x) NS_LOG_FUNCTION(x)
+
+#define _LOG_FUNCTION_NOARGS NS_LOG_FUNCTION_NOARGS
+
+#else
+
 #ifdef HAVE_LOG4CXX
 
 #include <log4cxx/logger.h>
@@ -30,7 +48,10 @@
 #define INIT_LOGGER(name) \
   static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger (name);
 
-#define _LOG_DEBUG(x) \
+#define _LOG_INFO(x) \
+  LOG4CXX_INFO(staticModuleLogger, x);
+
+#define _LOG_DEBUG(x)                           \
   LOG4CXX_DEBUG(staticModuleLogger, x);
 
 #define _LOG_TRACE(x) \
@@ -51,6 +72,7 @@
 #define _LOG_FUNCTION(x)
 #define _LOG_FUNCTION_NOARGS
 #define _LOG_TRACE(x)
+#define _LOG_INFO(x)
 #define INIT_LOGGERS(x)
 
 #ifdef _DEBUG
@@ -68,4 +90,6 @@
 
 #endif // HAVE_LOG4CXX
 
+#endif // NS3_MODULE
+
 #endif // SYNC_LOG_H
diff --git a/ns3/sync-scheduler.cc b/ns3/sync-scheduler.cc
index b236c02..7f39f38 100644
--- a/ns3/sync-scheduler.cc
+++ b/ns3/sync-scheduler.cc
@@ -27,6 +27,7 @@
 
 using namespace boost;
 using namespace std;
+using namespace ns3;
 
 INIT_LOGGER ("Scheduler");
 
@@ -41,22 +42,46 @@
 }
 
 void
-Scheduler::schedule (const boost::posix_time::time_duration &reltime, Event event, uint32_t label)
+Scheduler::eventWrapper (Event event)
 {
-  ns3::Seconds (reltime.total_seconds()) + ns3::MilliSeconds (reltime.milliseconds ()) + ns3::MicroSeconds (reltime.microseconds ());
+  event ();
+}
+
+void
+Scheduler::schedule (const TimeDuration &reltime, Event event, uint32_t label)
+{
+  list< EventId > &eventsForLabel = m_labeledEvents [label];
+  list< EventId >::iterator i = eventsForLabel.begin ();
+  while (i != eventsForLabel.end ())
+    {
+      if (i->IsExpired ())
+        {
+          list< EventId >::iterator next = i;
+          next ++;
+          eventsForLabel.erase (i);
+          i = next;
+        }
+      else
+        i ++;
+    }
+
+  ns3::EventId eventId = ns3::Simulator::Schedule (reltime, Scheduler::eventWrapper, event);
+  eventsForLabel.push_back (eventId);
 }
 
 void
 Scheduler::cancel (uint32_t label)
 {
-  // {
-  //   // cout << "Canceling label " << label << " size: " << m_events.size () << endl;
-  //   lock_guard<mutex> lock (m_eventsMutex);
-  //   m_events.get<byLabel> ().erase (label);
-  //   // cout << "Canceled label " << label << " size: " << m_events.size () << endl;
-  // }
-  // m_eventsCondition.notify_one ();
-  // m_thread.interrupt (); // interrupt sleep, if currently sleeping
+  list< EventId > &eventsForLabel = m_labeledEvents [label];
+
+  for (list< EventId >::iterator i = eventsForLabel.begin ();
+       i != eventsForLabel.end ();
+       i++)
+    {
+      i->Cancel ();
+    }
+
+  eventsForLabel.clear ();
 }
 
 
diff --git a/ns3/sync-scheduler.h b/ns3/sync-scheduler.h
index d3b536a..f10dc70 100644
--- a/ns3/sync-scheduler.h
+++ b/ns3/sync-scheduler.h
@@ -23,9 +23,17 @@
 #ifndef SYNC_SCHEDULER_H
 #define SYNC_SCHEDULER_H
 
-#include <boost/date_time/posix_time/posix_time.hpp>
+#include <ns3/nstime.h>
+#include <ns3/event-id.h>
+#include <list>
+#include <map>
+
 #include "sync-event.h"
 
+#define TIME_SECONDS(number) ns3::Seconds(number)
+#define TIME_MILLISECONDS(number) ns3::MilliSeconds(number)
+typedef ns3::Time TimeDuration;
+
 namespace Sync {
 
 /**
@@ -62,7 +70,7 @@
    * @param label Label for the event
    */
   void
-  schedule (const boost::posix_time::time_duration &reltime, Event event, uint32_t label); 
+  schedule (const TimeDuration &reltime, Event event, uint32_t label); 
 
   /**
    * @brief Cancel all events for the label
@@ -70,6 +78,13 @@
    */
   void
   cancel (uint32_t label);
+
+private:
+  static void
+  eventWrapper (Event event);
+
+private:
+  std::map< uint32_t, std::list< ns3::EventId > > m_labeledEvents;
 };
   
 }
