diff --git a/chatdialog.cpp b/chatdialog.cpp
index b7edf20..6fd93df 100644
--- a/chatdialog.cpp
+++ b/chatdialog.cpp
@@ -17,6 +17,8 @@
   DigestTreeScene *scene = new DigestTreeScene();
 
   treeViewer->setScene(scene);
+  QRectF rect = scene->itemsBoundingRect();
+  scene->setSceneRect(rect);
   //scene->plot();
 
   connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
@@ -144,3 +146,21 @@
     updateLabels();
   }
 }
+
+void 
+ChatDialog::resizeEvent(QResizeEvent *e)
+{
+  fitView();
+}
+
+void 
+ChatDialog::showEvent(QShowEvent *e)
+{
+  fitView();
+}
+
+void
+ChatDialog::fitView()
+{
+  treeViewer->fitInView(treeViewer->scene()->itemsBoundingRect(), Qt::KeepAspectRatio);
+}
diff --git a/chatdialog.h b/chatdialog.h
index 3ae668b..9ca77c0 100644
--- a/chatdialog.h
+++ b/chatdialog.h
@@ -26,6 +26,9 @@
   void readSettings();
   void writeSettings();
   void updateLabels();
+  void resizeEvent(QResizeEvent *);
+  void showEvent(QShowEvent *);
+  void fitView();
 
 private slots:
   void returnPressed();
diff --git a/digesttreescene.cpp b/digesttreescene.cpp
index 2d2f631..5133e4c 100644
--- a/digesttreescene.cpp
+++ b/digesttreescene.cpp
@@ -10,9 +10,33 @@
 
 static const double Pi = 3.14159265358979323846264338327950288419717;
 
+static void 
+testDraw(DigestTreeScene * scene) 
+{
+  std::string prefix[5] = {"/ndn/1", "/ndn/2", "/ndn/3", "/ndn/4", "/ndn/5"};
+  std::string nick[5] = {"tom", "jerry", "jason", "michael", "hurry"};
+  std::vector<Sync::MissingDataInfo> v;
+  for (int i = 0; i < 5; i++)
+  {
+    Sync::MissingDataInfo mdi = {prefix[i], Sync::SeqNo(0), Sync::SeqNo(i * (2 << i) )};
+    v.push_back(mdi);
+  }
+
+  scene->processUpdate(v, "12341234@!#%!@");
+
+  for (int i = 0; i < 5; i++)
+  {
+   scene-> msgReceived(prefix[i].c_str(), nick[i].c_str());
+  }
+}
+
+DigestTreeScene::DisplayUserPtr DigestTreeScene::DisplayUserNullPtr;
+
 DigestTreeScene::DigestTreeScene(QWidget *parent)
   : QGraphicsScene(parent)
 {
+  previouslyUpdatedUser = DisplayUserNullPtr;
+  testDraw(this);
 }
 
 void
@@ -44,8 +68,12 @@
       if (it != m_roster.end()) {
         DisplayUserPtr p = it.value();
         QGraphicsTextItem *item = p->getSeqTextItem();
+        QGraphicsRectItem *rectItem = p->getInnerRectItem();
         std::string s = boost::lexical_cast<std::string>(p->getSeqNo().getSeq());
         item->setPlainText(s.c_str());
+        QRectF textBR = item->boundingRect();
+        QRectF rectBR = rectItem->boundingRect();
+        item->setPos(rectBR.x() + (rectBR.width() - textBR.width())/2, rectBR.y() + (rectBR.height() - textBR.height())/2);
       }
     }
     m_rootDigest->setPlainText(digest);
@@ -53,6 +81,21 @@
 }
 
 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);
@@ -62,10 +105,21 @@
     if (nick != p->getNick()) {
       p->setNick(nick);
       QGraphicsTextItem *nickItem = p->getNickTextItem();
+      QGraphicsRectItem *nickRectItem = p->getNickRectItem();
       nickItem->setPlainText(p->getNick());
+      QRectF rectBR = nickRectItem->boundingRect();
+      QRectF nickBR = nickItem->boundingRect();
+      nickItem->setPos(rectBR.x() + (rectBR.width() - nickBR.width())/2, rectBR.y() + 5);
     }
-    QGraphicsRectItem *rimItem = p->getRimRectItem();
-    rimItem->setBrush(QBrush(Qt::red));
+
+    reDrawNode(p, Qt::red);
+
+    if (previouslyUpdatedUser != DisplayUserNullPtr) 
+    {
+      reDrawNode(previouslyUpdatedUser, Qt::darkBlue);
+    }
+
+    previouslyUpdatedUser = p;
   }
 }
 
@@ -83,7 +137,7 @@
   }
   ogdf::GraphAttributes GA(m_graph);
 
-  int nodeSize = 50;
+  int nodeSize = 40;
   int siblingDistance = 100, levelDistance = 100;
   ogdf::TreeLayout layout;
   layout.siblingDistance(siblingDistance);
@@ -92,13 +146,15 @@
 
   int width = GA.boundingBox().width();
   int height = GA.boundingBox().height();
-  setSceneRect(QRect(- (width + nodeSize) / 2, - 40, width + nodeSize, height + nodeSize));
+  //setSceneRect(QRect(- (width + nodeSize) / 2, - 50, width + nodeSize, height + nodeSize));
   GA.setAllWidth(nodeSize);
   GA.setAllHeight(nodeSize);
 
   plotEdge(GA);
   plotNode(GA, rootIndex, digest);
 
+  previouslyUpdatedUser = DisplayUserNullPtr;
+
 }
 
 void
@@ -141,19 +197,19 @@
     int rim = 3;
     QRectF boundingRect(x, y, w, h);
     QRectF innerBoundingRect(x + rim, y + rim, w - rim * 2, h - rim * 2);
-    addRect(innerBoundingRect, QPen(Qt::black), QBrush(Qt::lightGray));
 
     if (n->index() == rootIndex) 
     {
       addRect(boundingRect, QPen(Qt::black), QBrush(Qt::darkRed));
+      addRect(innerBoundingRect, QPen(Qt::black), QBrush(Qt::lightGray));
 
-      QRectF digestRect(x - w / 2, y - h - 5, 2 * w, 30);
+      QRectF digestRect(x - w, y - h, 3 * w, 30);
       addRect(digestRect, QPen(Qt::darkCyan), QBrush(Qt::darkCyan));
       QGraphicsTextItem *digestItem = addText(digest);
       QRectF digestBoundingRect = digestItem->boundingRect();
       digestItem->setDefaultTextColor(Qt::white);
       digestItem->setFont(QFont("Cursive", 12, QFont::Bold));
-      digestItem->setPos(x + w / 2 - digestBoundingRect.width() / 2, y - h - 15);
+      digestItem->setPos(x - w + (3 * w - digestBoundingRect.width()) / 2, y - h + 5);
       m_rootDigest = digestItem;
     }
     else
@@ -170,6 +226,9 @@
       QGraphicsRectItem *rectItem = addRect(boundingRect, QPen(Qt::black), QBrush(Qt::darkBlue));
       p->setRimRectItem(rectItem);
 
+      QGraphicsRectItem *innerRectItem = addRect(innerBoundingRect, QPen(Qt::black), QBrush(Qt::lightGray));
+      p->setInnerRectItem(innerRectItem);
+
       std::string s = boost::lexical_cast<std::string>(p->getSeqNo().getSeq());
       QGraphicsTextItem *seqItem = addText(s.c_str());
       seqItem->setFont(QFont("Cursive", 12, QFont::Bold));
@@ -177,15 +236,17 @@
       seqItem->setPos(x + w / 2 - seqBoundingRect.width() / 2, y + h / 2 - seqBoundingRect.height() / 2);
       p->setSeqTextItem(seqItem);
 
-      QRectF textRect(x - w / 2, y + h + 10, 2 * w, 30);
-      addRect(textRect, QPen(Qt::darkCyan), QBrush(Qt::darkCyan));
+      QRectF textRect(x - w / 2, y + h, 2 * w, 30);
+      QGraphicsRectItem *nickRectItem = addRect(textRect, QPen(Qt::darkCyan), QBrush(Qt::darkCyan));
+      p->setNickRectItem(nickRectItem);
       QGraphicsTextItem *nickItem = addText(p->getNick());
       QRectF textBoundingRect = nickItem->boundingRect();
       nickItem->setDefaultTextColor(Qt::white);
       nickItem->setFont(QFont("Cursive", 12, QFont::Bold));
-      nickItem->setPos(x + w / 2 - textBoundingRect.width() / 2, y + h + 15);
+      nickItem->setPos(x + w / 2 - textBoundingRect.width() / 2, y + h + 5);
       p->setNickTextItem(nickItem);
     }
+
   }
 }
 
diff --git a/digesttreescene.h b/digesttreescene.h
index 5c8af9d..08a50d0 100644
--- a/digesttreescene.h
+++ b/digesttreescene.h
@@ -10,6 +10,7 @@
 #include <QMap>
 #include <vector>
 #include <tr1/memory>
+#include <QColor>
 
 class QGraphicsTextItem;
 
@@ -24,18 +25,22 @@
 typedef QMap<QString, DisplayUserPtr> Roster;
 typedef QMap<QString, DisplayUserPtr>::iterator Roster_iterator;
 typedef QMapIterator<QString, DisplayUserPtr> RosterIterator;
+static DisplayUserPtr DisplayUserNullPtr;
 
 public:
   DigestTreeScene(QWidget *parent = 0);
   void processUpdate(std::vector<Sync::MissingDataInfo> &v, QString digest);
   void msgReceived(QString prefix, QString nick);
+private:
   void plot(QString digest);
   void plotEdge(ogdf::GraphAttributes &GA);
   void plotNode(ogdf::GraphAttributes &GA, int rootIndex, QString digest);
+  void reDrawNode(DisplayUserPtr p, QColor rimColor);
 private:
   ogdf::Graph m_graph;
   Roster m_roster;
   QGraphicsTextItem *m_rootDigest; 
+  DisplayUserPtr previouslyUpdatedUser;
 
 };
 
@@ -70,13 +75,19 @@
   QGraphicsTextItem *getSeqTextItem() {return m_seqTextItem;}
   QGraphicsTextItem *getNickTextItem() {return m_nickTextItem;}
   QGraphicsRectItem *getRimRectItem() {return m_rimRectItem;}
+  QGraphicsRectItem *getInnerRectItem() {return m_innerRectItem;}
+  QGraphicsRectItem *getNickRectItem() {return m_nickRectItem;}
   void setSeqTextItem(QGraphicsTextItem *item) { m_seqTextItem = item;}
   void setNickTextItem(QGraphicsTextItem *item) { m_nickTextItem = item;}
   void setRimRectItem(QGraphicsRectItem *item) {m_rimRectItem = item;}
+  void setInnerRectItem(QGraphicsRectItem *item) {m_innerRectItem = item;}
+  void setNickRectItem(QGraphicsRectItem *item) {m_nickRectItem = item;}
 private:
   QGraphicsTextItem *m_seqTextItem;
   QGraphicsTextItem *m_nickTextItem;
   QGraphicsRectItem *m_rimRectItem;
+  QGraphicsRectItem *m_innerRectItem;
+  QGraphicsRectItem *m_nickRectItem;
 };
 
 #endif
