diff --git a/demo/chatdialog.cpp b/demo/chatdialog.cpp
index 6fd93df..10c7af0 100644
--- a/demo/chatdialog.cpp
+++ b/demo/chatdialog.cpp
@@ -5,26 +5,47 @@
 #include <iostream>
 #include <QTimer>
 
+#define BROADCAST_PREFIX_FOR_SYNC_DEMO "/ndn/broadcast/sync-demo"
+
 ChatDialog::ChatDialog(QWidget *parent)
-  : QDialog(parent)
+  : QDialog(parent), m_sock(NULL)
 {
   setupUi(this);
+  m_session = time(NULL);
 
   readSettings();
+
   updateLabels();
 
   lineEdit->setFocusPolicy(Qt::StrongFocus);
-  DigestTreeScene *scene = new DigestTreeScene();
+  m_scene = new DigestTreeScene(this);
 
-  treeViewer->setScene(scene);
-  QRectF rect = scene->itemsBoundingRect();
-  scene->setSceneRect(rect);
-  //scene->plot();
+  treeViewer->setScene(m_scene);
+  m_scene->plot("Empty");
+  QRectF rect = m_scene->itemsBoundingRect();
+  m_scene->setSceneRect(rect);
+
+  // create sync socket
+  if(!m_user.getChatroom().isEmpty()) {
+    std::string syncPrefix = BROADCAST_PREFIX_FOR_SYNC_DEMO;
+    syncPrefix += "/";
+    syncPrefix += m_user.getChatroom().toStdString();
+    m_sock = new Sync::SyncAppSocket(syncPrefix, bind(&ChatDialog::processTreeUpdate, this, _1, _2), bind(&ChatDialog::processRemove, this, _1));
+  }
 
   connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
   connect(setButton, SIGNAL(pressed()), this, SLOT(buttonPressed()));
 }
 
+ChatDialog::~ChatDialog()
+{
+  if (m_sock != NULL) 
+  {
+    delete m_sock;
+    m_sock = NULL;
+  }
+}
+
 void
 ChatDialog::appendMessage(const SyncDemo::ChatMessage &msg) 
 {
@@ -54,15 +75,79 @@
 }
 
 void
+ChatDialog::processTreeUpdate(const std::vector<Sync::MissingDataInfo> &v, Sync::SyncAppSocket *)
+{
+  if (v.empty())
+  {
+    return;
+  }
+
+  // reflect the changes on digest tree
+  m_scene->processUpdate(v, m_sock->getRootDigest().c_str());
+
+  int n = v.size();
+  int totalMissingPackets = 0;
+  for (int i = 0; i < n; i++) 
+  {
+    totalMissingPackets += v[i].high.getSeq() - v[i].low.getSeq() + 1;
+  }
+  
+  if (totalMissingPackets < 10) {
+    for (int i = 0; i < n; i++) 
+    {
+      for (Sync::SeqNo seq = v[i].low; seq <= v[i].high; ++seq)
+      {
+        m_sock->fetchRaw(v[i].prefix, seq, bind(&ChatDialog::processData, this, _1, _2, _3), 2);
+      }
+    }
+  }
+  else
+  {
+    // too bad; too many missing packets
+    // we may just join a new chatroom
+    // or some network patition just healed
+    // we don't try to fetch any data in this case (for now)
+  }
+
+  // adjust the view
+  fitView();
+
+}
+
+void
+ChatDialog::processData(std::string name, const char *buf, size_t len)
+{
+  SyncDemo::ChatMessage msg;
+  if (!msg.ParseFromArray(buf, len)) 
+  {
+    std::cerr << "Errrrr.. Can not parse msg at "<<__FILE__ <<":"<<__LINE__<<". what is happening?" << std::endl;
+    abort();
+  }
+
+  // display
+  appendMessage(msg);
+  
+  // update the tree view
+  std::string prefix = name.substr(0, name.find_last_of('/'));
+  m_scene->msgReceived(prefix.c_str(), msg.from().c_str());
+}
+
+void
+ChatDialog::processRemove(std::string prefix)
+{
+}
+
+void
 ChatDialog::formChatMessage(const QString &text, SyncDemo::ChatMessage &msg) {
   msg.set_from(m_user.getNick().toStdString());
   msg.set_to(m_user.getChatroom().toStdString());
   msg.set_data(text.toStdString());
   time_t seconds = time(NULL);
   msg.set_timestamp(seconds);
+  msg.set_type(SyncDemo::ChatMessage::CHAT);
 }
 
-void
+bool
 ChatDialog::readSettings()
 {
   QSettings s(ORGANIZATION, APPLICATION);
@@ -71,11 +156,13 @@
   QString prefix = s.value("prefix", "").toString();
   if (nick == "" || chatroom == "" || prefix == "") {
     QTimer::singleShot(500, this, SLOT(buttonPressed()));
+    return false;
   }
   else {
     m_user.setNick(nick);
     m_user.setChatroom(chatroom);
     m_user.setPrefix(prefix);
+    return true;
   }
 }
 
@@ -109,9 +196,18 @@
   SyncDemo::ChatMessage msg;
   formChatMessage(text, msg);
   
-  // TODO:
-  // send message
   appendMessage(msg);
+
+  // send msg
+  size_t size = msg.ByteSize();
+  char *buf = new char[size];
+  msg.SerializeToArray(buf, size);
+  if (!msg.IsInitialized()) 
+  {
+    std::cerr << "Errrrr.. msg was not probally initialized "<<__FILE__ <<":"<<__LINE__<<". what is happening?" << std::endl;
+    abort();
+  }
+  m_sock->publishRaw(m_user.getPrefix().toStdString(), m_session, buf, size, 60);
   
 }
 
@@ -139,7 +235,22 @@
   if (!chatroom.isEmpty() && chatroom != m_user.getChatroom()) {
     m_user.setChatroom(chatroom);
     needWrite = true;
+
+    m_scene->clearAll();
+    m_scene->plot("Empty");
     // TODO: perhaps need to do a lot. e.g. use a new SyncAppSokcet
+    if (m_sock != NULL) 
+    {
+      delete m_sock;
+      m_sock = NULL;
+    }
+    std::string syncPrefix = BROADCAST_PREFIX_FOR_SYNC_DEMO;
+    syncPrefix += "/";
+    syncPrefix += m_user.getChatroom().toStdString();
+    m_sock = new Sync::SyncAppSocket(syncPrefix, bind(&ChatDialog::processTreeUpdate, this, _1, _2), bind(&ChatDialog::processRemove, this, _1));
+
+    fitView();
+    
   }
   if (needWrite) {
     writeSettings();
@@ -162,5 +273,5 @@
 void
 ChatDialog::fitView()
 {
-  treeViewer->fitInView(treeViewer->scene()->itemsBoundingRect(), Qt::KeepAspectRatio);
+  treeViewer->fitInView(m_scene->itemsBoundingRect(), Qt::KeepAspectRatio);
 }
diff --git a/demo/chatdialog.h b/demo/chatdialog.h
index 9ca77c0..252144b 100644
--- a/demo/chatdialog.h
+++ b/demo/chatdialog.h
@@ -18,12 +18,15 @@
 
 public:
 	ChatDialog(QWidget *parent = 0);
+  ~ChatDialog();
   void appendMessage(const SyncDemo::ChatMessage &msg);
-  void processData(const std::vector<Sync::MissingDataInfo> &, Sync::SyncAppSocket *);
+  void processTreeUpdate(const std::vector<Sync::MissingDataInfo> &, Sync::SyncAppSocket *);
+  void processData(std::string, const char *buf, size_t len);
+  void processRemove(const std::string);
 
 private:
   void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg);
-  void readSettings();
+  bool readSettings();
   void writeSettings();
   void updateLabels();
   void resizeEvent(QResizeEvent *);
@@ -38,5 +41,7 @@
 private:
   User m_user; 
   Sync::SyncAppSocket *m_sock;
+  uint32_t m_session;
+  DigestTreeScene *m_scene;
 };
 #endif
diff --git a/demo/digesttreescene.cpp b/demo/digesttreescene.cpp
index 5133e4c..0dd7a10 100644
--- a/demo/digesttreescene.cpp
+++ b/demo/digesttreescene.cpp
@@ -36,11 +36,11 @@
   : QGraphicsScene(parent)
 {
   previouslyUpdatedUser = DisplayUserNullPtr;
-  testDraw(this);
+//  testDraw(this);
 }
 
 void
-DigestTreeScene::processUpdate(std::vector<Sync::MissingDataInfo> &v, QString digest)
+DigestTreeScene::processUpdate(const std::vector<Sync::MissingDataInfo> &v, QString digest)
 {
   int n = v.size();
   bool rePlot = false; 
@@ -81,21 +81,6 @@
 }
 
 void
-DigestTreeScene::reDrawNode(DisplayUserPtr p, QColor rimColor)
-{
-    QGraphicsRectItem *rimItem = p->getRimRectItem();
-    rimItem->setBrush(QBrush(rimColor));
-    QGraphicsRectItem *innerItem = p->getInnerRectItem();
-    innerItem->setBrush(QBrush(Qt::lightGray));
-    QGraphicsTextItem *seqTextItem = p->getSeqTextItem();
-    std::string s = boost::lexical_cast<std::string>(p->getSeqNo().getSeq());
-    seqTextItem->setPlainText(s.c_str());
-    QRectF textBR = seqTextItem->boundingRect();
-    QRectF innerBR = innerItem->boundingRect();
-    seqTextItem->setPos(innerBR.x() + (innerBR.width() - textBR.width())/2, innerBR.y() + (innerBR.height() - textBR.height())/2);
-}
-
-void
 DigestTreeScene::msgReceived(QString prefix, QString nick)
 {
   Roster_iterator it = m_roster.find(prefix);
@@ -124,6 +109,14 @@
 }
 
 void
+DigestTreeScene::clearAll()
+{
+  clear();
+  m_graph.clear();
+  m_roster.clear();
+}
+
+void
 DigestTreeScene::plot(QString digest)
 {
   clear();
@@ -250,3 +243,18 @@
   }
 }
 
+void
+DigestTreeScene::reDrawNode(DisplayUserPtr p, QColor rimColor)
+{
+    QGraphicsRectItem *rimItem = p->getRimRectItem();
+    rimItem->setBrush(QBrush(rimColor));
+    QGraphicsRectItem *innerItem = p->getInnerRectItem();
+    innerItem->setBrush(QBrush(Qt::lightGray));
+    QGraphicsTextItem *seqTextItem = p->getSeqTextItem();
+    std::string s = boost::lexical_cast<std::string>(p->getSeqNo().getSeq());
+    seqTextItem->setPlainText(s.c_str());
+    QRectF textBR = seqTextItem->boundingRect();
+    QRectF innerBR = innerItem->boundingRect();
+    seqTextItem->setPos(innerBR.x() + (innerBR.width() - textBR.width())/2, innerBR.y() + (innerBR.height() - textBR.height())/2);
+}
+
diff --git a/demo/digesttreescene.h b/demo/digesttreescene.h
index 08a50d0..91876e6 100644
--- a/demo/digesttreescene.h
+++ b/demo/digesttreescene.h
@@ -29,10 +29,11 @@
 
 public:
   DigestTreeScene(QWidget *parent = 0);
-  void processUpdate(std::vector<Sync::MissingDataInfo> &v, QString digest);
+  void processUpdate(const std::vector<Sync::MissingDataInfo> &v, QString digest);
   void msgReceived(QString prefix, QString nick);
-private:
+  void clearAll();
   void plot(QString digest);
+private:
   void plotEdge(ogdf::GraphAttributes &GA);
   void plotNode(ogdf::GraphAttributes &GA, int rootIndex, QString digest);
   void reDrawNode(DisplayUserPtr p, QColor rimColor);
