diff --git a/src/chatroom-discovery-dialog.cpp b/src/chatroom-discovery-dialog.cpp
index 327e4e7..738eb84 100644
--- a/src/chatroom-discovery-dialog.cpp
+++ b/src/chatroom-discovery-dialog.cpp
@@ -3,7 +3,6 @@
 
 namespace chronos {
 
-using std::vector;
 using ndn::Name;
 
 ChatroomDiscoveryDialog::ChatroomDiscoveryDialog(QWidget* parent)
@@ -67,7 +66,7 @@
 
     QString content;
 
-    for (vector<Name>::const_iterator nameIt = it->second.getParticipants().begin();
+    for (std::list<Name>::const_iterator nameIt = it->second.getParticipants().begin();
          nameIt != it->second.getParticipants().end(); nameIt++) {
       content.append(QString::fromStdString(nameIt->toUri())).append(",");
     }
diff --git a/src/chatroom-discovery-logic.cpp b/src/chatroom-discovery-logic.cpp
index 048d121..8d8590b 100644
--- a/src/chatroom-discovery-logic.cpp
+++ b/src/chatroom-discovery-logic.cpp
@@ -151,18 +151,18 @@
                                       const ndn::Data& data,
                                       const bool isRefreshing)
 {
-  Name::Component chatroomName = data.getName().get(OFFSET_CHATROOM_NAME);
+  // Name::Component chatroomName = data.getName().get(OFFSET_CHATROOM_NAME);
 
   ChatroomInfo chatroom;
   chatroom.wireDecode(data.getContent().blockFromValue());
-  chatroom.setName(chatroomName);
+  // chatroom.setName(chatroomName);
 
   // Tmp Disabled
   // if (chatroom.getTrustModel() == ChatroomInfo::TRUST_MODEL_WEBOFTRUST)
   //   addContacts(chatroom);
 
 
-  m_chatrooms[chatroomName] = chatroom;
+  m_chatrooms[chatroom.getName()] = chatroom;
   m_onUpdate(chatroom, true); //add
 
   time::milliseconds refreshingTime;
@@ -172,7 +172,8 @@
     refreshingTime = DEFAULT_REFRESHING_TIMER;
 
   m_scheduler.scheduleEvent(refreshingTime,
-                            bind(&ChatroomDiscoveryLogic::refreshChatroom, this, chatroomName));
+                            bind(&ChatroomDiscoveryLogic::refreshChatroom, this,
+                                 chatroom.getName()));
 
   if (!isRefreshing)
     sendDiscoveryInterest();
@@ -218,4 +219,4 @@
 }
 
 
-} //namespace chronos
+} // namespace chronos
diff --git a/src/chatroom-discovery-view-dialog.cpp b/src/chatroom-discovery-view-dialog.cpp
index 7eff07b..ac6c775 100644
--- a/src/chatroom-discovery-view-dialog.cpp
+++ b/src/chatroom-discovery-view-dialog.cpp
@@ -13,7 +13,6 @@
 
 namespace chronos {
 
-using std::vector;
 using ndn::Name;
 
 ChatroomDiscoveryViewDialog::ChatroomDiscoveryViewDialog(QWidget* parent)
@@ -52,10 +51,10 @@
 }
 
 void
-ChatroomDiscoveryViewDialog::setChatroomParticipants(const vector<Name>& participants)
+ChatroomDiscoveryViewDialog::setChatroomParticipants(const std::list<Name>& participants)
 {
   QString content;
-  for (vector<Name>::const_iterator it = participants.begin();
+  for (std::list<Name>::const_iterator it = participants.begin();
        it != participants.end(); it++) {
     content.append(QString::fromStdString(it->toUri())).append("\n");
   }
diff --git a/src/chatroom-discovery-view-dialog.hpp b/src/chatroom-discovery-view-dialog.hpp
index d074e71..bb29b7a 100644
--- a/src/chatroom-discovery-view-dialog.hpp
+++ b/src/chatroom-discovery-view-dialog.hpp
@@ -39,7 +39,7 @@
   setChatroomTrustModel(QString chatroomTrustModel);
 
   void
-  setChatroomParticipants(const std::vector<ndn::Name>& chatroomParticipants);
+  setChatroomParticipants(const std::list<ndn::Name>& chatroomParticipants);
 
 
 private slots:
diff --git a/src/chatroom-info.cpp b/src/chatroom-info.cpp
index 2b23719..f6b81e3 100644
--- a/src/chatroom-info.cpp
+++ b/src/chatroom-info.cpp
@@ -27,27 +27,62 @@
 {
   size_t totalLength = 0;
 
-  //Chatroom := CHATROOM-TYPE TLV-LENGTH
-  //              TrustModel
-  //              Participant+
+  // ChatroomInfo := CHATROOM-INFO-TYPE TLV-LENGTH
+  //                   ChatroomName
+  //                   TrustModel
+  //                   ChatroomPrefix
+  //                   ManagerPrefix
+  //                   Participants
+  //
+  // ChatroomName := CHATROOM-NAME-TYPE TLV-LENGTH
+  //                   NameComponent
+  //
+  // TrustModel := TRUST-MODEL-TYPE TLV-LENGTH
+  //                 nonNegativeInteger
+  //
+  // ChatroomPrefix := CHATROOM-PREFIX-TYPE TLV-LENGTH
+  //                     Name
+  //
+  // ManagerPrefix := MANAGER-PREFIX-TYPE TLV-LENGTH
+  //                    Name
+  //
+  // Participants := PARTICIPANTS-TYPE TLV-LENGTH
+  //                   Name+
 
-  //Participants
-  for (std::vector<Name>::const_reverse_iterator it = m_participants.rbegin();
+  // Participants
+  size_t participantsLength = 0;
+  for (std::list<Name>::const_reverse_iterator it = m_participants.rbegin();
        it != m_participants.rend(); ++it) {
-    size_t entryLength = 0;
-
-    entryLength += it->wireEncode(block);
-    entryLength += block.prependVarNumber(entryLength);
-    entryLength += block.prependVarNumber(tlv::PARTICIPANT);
-    totalLength += entryLength;
+    participantsLength += it->wireEncode(block);
   }
+  participantsLength += block.prependVarNumber(participantsLength);
+  participantsLength += block.prependVarNumber(tlv::Participants);
+  totalLength += participantsLength;
 
-  //TrustModel
-  totalLength += prependNonNegativeIntegerBlock(block, tlv::TRUSTMODEL, m_trustModel);
+  // Manager Prefix
+  size_t managerLength = m_manager.wireEncode(block);
+  totalLength += managerLength;
+  totalLength += block.prependVarNumber(managerLength);
+  totalLength += block.prependVarNumber(tlv::ManagerPrefix);
 
-  //type = TYPE_CHATROOM;
+  // Chatroom Sync Prefix
+  size_t chatroomSyncPrefixLength = m_syncPrefix.wireEncode(block);
+  totalLength += chatroomSyncPrefixLength;
+  totalLength += block.prependVarNumber(chatroomSyncPrefixLength);
+  totalLength += block.prependVarNumber(tlv::ChatroomPrefix);
+
+  // Trust Model
+  totalLength += prependNonNegativeIntegerBlock(block, tlv::TrustModel, m_trustModel);
+
+  // Chatroom Name
+  size_t chatroomNameLength = m_chatroomName.wireEncode(block);
+  totalLength += chatroomNameLength;
+  totalLength += block.prependVarNumber(chatroomNameLength);
+  totalLength += block.prependVarNumber(tlv::ChatroomName);
+
+  // Chatroom Info
   totalLength += block.prependVarNumber(totalLength);
-  totalLength += block.prependVarNumber(tlv::CHATROOM);
+  totalLength += block.prependVarNumber(tlv::ChatroomInfo);
 
   return totalLength;
 }
@@ -75,37 +110,102 @@
 
   m_participants.clear();
 
-  //Chatroom := CHATROOM-TYPE TLV-LENGTH
-  //              TrustModel
-  //              Participant+
+  // ChatroomInfo := CHATROOM-INFO-TYPE TLV-LENGTH
+  //                   ChatroomName
+  //                   TrustModel
+  //                   ChatroomPrefix
+  //                   ManagerPrefix
+  //                   Participants
+  //
+  // ChatroomName := CHATROOM-NAME-TYPE TLV-LENGTH
+  //                   NameComponent
+  //
+  // TrustModel := TRUST-MODEL-TYPE TLV-LENGTH
+  //                 nonNegativeInteger
+  //
+  // ChatroomPrefix := CHATROOM-PREFIX-TYPE TLV-LENGTH
+  //                     Name
+  //
+  // ManagerPrefix := MANAGER-PREFIX-TYPE TLV-LENGTH
+  //                    Name
+  //
+  // Participants := PARTICIPANTS-TYPE TLV-LENGTH
+  //                   Name+
 
-  if (m_wire.type() != tlv::CHATROOM)
+  if (m_wire.type() != tlv::ChatroomInfo)
     throw Error("Unexpected TLV number when decoding chatroom packet");
 
+  // Chatroom Info
   Block::element_const_iterator i = m_wire.elements_begin();
 
-  //TrustModel
-  if (i == m_wire.elements_end() || i->type() != tlv::TRUSTMODEL)
+  if (i == m_wire.elements_end() || i->type() != tlv::ChatroomName)
+    throw Error("Missing Chatroom Name Info");
+  m_chatroomName.wireDecode(i->blockFromValue());
+
+  ++i;
+
+  // Trust Model
+  if (i == m_wire.elements_end() || i->type() != tlv::TrustModel)
     throw Error("Missing TrustModel");
   m_trustModel =
       static_cast<TrustModel>(readNonNegativeInteger(*i));
 
   ++i;
 
-  //Participants
-  for (; i != m_wire.elements_end() && i->type() == tlv::PARTICIPANT; ++i) {
-    Name name;
-    name.wireDecode(i->blockFromValue());
-    m_participants.push_back(name);
+  // Chatroom Sync Prefix
+  if (i == m_wire.elements_end() || i->type() != tlv::ChatroomPrefix)
+    throw Error("Missing Chatroom Prefix");
+  m_syncPrefix.wireDecode(i->blockFromValue());
+
+  ++i;
+
+  // Manager Prefix
+  if (i == m_wire.elements_end() || i->type() != tlv::ManagerPrefix)
+    throw Error("Missing Manager Prefix");
+  m_manager.wireDecode(i->blockFromValue());
+  ++i;
+
+  // Participants
+  if (i == m_wire.elements_end() || i->type() != tlv::Participants)
+    throw Error("Missing Participant");
+
+  Block temp = *i;
+  temp.parse();
+
+  Block::element_const_iterator j = temp.elements_begin();
+
+  while (j != temp.elements_end() && j->type() == tlv::Name) {
+    m_participants.push_back(Name(*j));
+    ++j;
   }
+  if (j != temp.elements_end())
+    throw Error("Unexpected element");
+
   if (m_participants.empty())
     throw Error("Missing Participant");
+
+  ++i;
+
   if (i != m_wire.elements_end()) {
     throw Error("Unexpected element");
   }
 }
 
 void
+ChatroomInfo::setName(const Name::Component& name)
+{
+  m_wire.reset();
+  m_chatroomName = name;
+}
+
+void
+ChatroomInfo::setTrustModel(const TrustModel trustModel)
+{
+  m_wire.reset();
+  m_trustModel = trustModel;
+}
+
+void
 ChatroomInfo::addParticipant(const Name& participant)
 {
   m_wire.reset();
@@ -113,24 +213,24 @@
 }
 
 void
-ChatroomInfo::addContact(const Name& contact)
+ChatroomInfo::removeParticipant(const Name& participant)
 {
   m_wire.reset();
-  m_contacts.push_back(contact);
+  m_participants.remove(participant);
 }
 
 void
-ChatroomInfo::setName(const Name::Component& name)
+ChatroomInfo::setSyncPrefix(const Name& prefix)
 {
   m_wire.reset();
-  m_name = name;
+  m_syncPrefix = prefix;
 }
 
 void
-ChatroomInfo::setTrustModel(const TrustModel trustModel)
+ChatroomInfo::setManager(const Name& manager)
 {
   m_wire.reset();
-  m_trustModel = trustModel;
+  m_manager = manager;
 }
 
-} //namespace chronos
+} // namespace chronos
diff --git a/src/chatroom-info.hpp b/src/chatroom-info.hpp
index e182713..fc7c707 100644
--- a/src/chatroom-info.hpp
+++ b/src/chatroom-info.hpp
@@ -22,6 +22,7 @@
 #include <ndn-cxx/encoding/encoding-buffer.hpp>
 #include <ndn-cxx/exclude.hpp>
 #include <boost/concept_check.hpp>
+#include <list>
 
 namespace chronos {
 
@@ -44,7 +45,6 @@
     }
   };
 
-
   enum TrustModel {
     TRUST_MODEL_HIERARCHICAL = 2,
     TRUST_MODEL_WEBOFTRUST = 1,
@@ -67,26 +67,35 @@
   const Name::Component&
   getName() const;
 
+  const TrustModel
+  getTrustModel() const;
+
+  const Name&
+  getSyncPrefix() const;
+
+  const Name&
+  getManagerPrefix() const;
+
+  const std::list<Name>&
+  getParticipants() const;
+
   void
   setName(const Name::Component& name);
 
-  const std::vector<Name>&
-  getParticipants() const;
+  void
+  setTrustModel(const TrustModel trustModel);
 
   void
   addParticipant(const Name& participant);
 
-  const std::vector<Name>&
-  getContacts() const;
+  void
+  removeParticipant(const Name& participant);
 
   void
-  addContact(const Name& contact);
-
-  const TrustModel
-  getTrustModel() const;
+  setSyncPrefix(const Name& prefix);
 
   void
-  setTrustModel(const TrustModel trustModel);
+  setManager(const Name& manager);
 
 private:
   template<bool T>
@@ -95,29 +104,18 @@
 
 private:
   mutable Block m_wire;
-  Name::Component m_name;
-  std::vector<Name> m_participants;
+  Name::Component m_chatroomName;
+  std::list<Name> m_participants;
+  Name m_manager;
+  Name m_syncPrefix;
   TrustModel m_trustModel;
-  std::vector<Name> m_contacts;
 
 };
 
 inline const Name::Component&
 ChatroomInfo::getName() const
 {
-  return m_name;
-}
-
-inline const std::vector<Name>&
-ChatroomInfo::getParticipants() const
-{
-  return m_participants;
-}
-
-inline const std::vector<Name>&
-ChatroomInfo::getContacts() const
-{
-  return m_contacts;
+  return m_chatroomName;
 }
 
 inline const ChatroomInfo::TrustModel
@@ -126,6 +124,25 @@
   return m_trustModel;
 }
 
+
+inline const Name&
+ChatroomInfo::getManagerPrefix() const
+{
+  return m_manager;
+}
+
+inline const Name&
+ChatroomInfo::getSyncPrefix() const
+{
+  return m_syncPrefix;
+}
+
+inline const std::list<Name>&
+ChatroomInfo::getParticipants() const
+{
+  return m_participants;
+}
+
 BOOST_CONCEPT_ASSERT((ndn::WireEncodable<ChatroomInfo>));
 BOOST_CONCEPT_ASSERT((ndn::WireDecodable<ChatroomInfo>));
 
diff --git a/src/chatroom-tlv.hpp b/src/chatroom-tlv.hpp
index 954fbb5..c69c639 100644
--- a/src/chatroom-tlv.hpp
+++ b/src/chatroom-tlv.hpp
@@ -6,13 +6,16 @@
 namespace tlv {
 
 enum {
-  PARTICIPANT = 128,
-  CHATROOM = 129,
-  TRUSTMODEL = 130
+  ChatroomInfo = 128,
+  ChatroomName = 129,
+  TrustModel = 130,
+  ChatroomPrefix = 131,
+  ManagerPrefix = 132,
+  Participants = 133,
 };
 
-} //namespace tlv
+} // namespace tlv
 
-} //namespace chronos
+} // namespace chronos
 
-#endif //CHRONOCHAT_CHATROOM_TLV_HPP
+#endif // CHRONOCHAT_CHATROOM_TLV_HPP
diff --git a/test/test-chatroom-discovery-logic.cpp b/test/test-chatroom-discovery-logic.cpp
deleted file mode 100644
index 1714e8a..0000000
--- a/test/test-chatroom-discovery-logic.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-#include "chatroom-discovery-logic.hpp"
-#include <boost/test/unit_test.hpp>
-#include "dummy-client-face.hpp"
-
-namespace chronos {
-
-namespace test {
-
-using std::string;
-
-BOOST_AUTO_TEST_SUITE(TestChatroomDiscoveryLogic)
-
-class Fixture
-{
-public:
-  Fixture()
-    : face(makeDummyClientFace())
-  {
-  }
-
-  void
-  update(const ChatroomInfo& chatroomName, bool isAdd)
-  {
-  }
-
-public:
-  shared_ptr<DummyClientFace> face;
-};
-
-BOOST_FIXTURE_TEST_CASE(AddLocalChatroom, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
-  chatroom.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom);
-
-  ndn::Name::Component chatroomName("lunch-talk");
-
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 1);
-  BOOST_CHECK_EQUAL(chatroom.getName(),
-                    chatroomDiscoveryLogic.getChatrooms().find(chatroomName)
-                    ->second.getName());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants().size(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getTrustModel());
-}
-
-BOOST_FIXTURE_TEST_CASE(RemoveLocalChatroom, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
-  chatroom.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom);
-
-  ndn::Name::Component chatroomName1("lunch-talk");
-  ndn::Name::Component chatroomName2("supper-talk");
-
-  chatroomDiscoveryLogic.removeLocalChatroom(chatroomName2);
-
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 1);
-  BOOST_CHECK_EQUAL(chatroom.getName(),
-                    chatroomDiscoveryLogic.getChatrooms().find(chatroomName1)
-                    ->second.getName());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants().size(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName1)->second.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName1)->second
-                    .getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName1)->second
-                    .getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName1)->second.getTrustModel());
-
-  chatroomDiscoveryLogic.removeLocalChatroom(chatroomName1);
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 0);
-}
-
-BOOST_FIXTURE_TEST_CASE(sendChatroomInterestFunction, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-  chatroomDiscoveryLogic.sendDiscoveryInterest();
-
-  face->processEvents(time::milliseconds(100));
-
-  //with no exclude filter
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 2);//first is nfd register interest
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 0);
-  BOOST_CHECK_EQUAL(face->m_sentInterests[1].getName().toUri(),
-                    ChatroomDiscoveryLogic::DISCOVERY_PREFIX.toUri());
-  BOOST_CHECK_EQUAL(face->m_sentInterests[1].getExclude().size(), 0);
-
-  face->m_sentInterests.clear();
-
-  //with exclude filter
-  ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
-  chatroom.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom);
-
-  chatroomDiscoveryLogic.sendDiscoveryInterest();
-  face->processEvents(time::milliseconds(100));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 1);
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 0);
-  BOOST_CHECK_EQUAL(face->m_sentInterests[0].getName().toUri(),
-                    ChatroomDiscoveryLogic::DISCOVERY_PREFIX.toUri());
-  BOOST_CHECK_EQUAL(face->m_sentInterests[0].getExclude().size(), 1);
-  BOOST_CHECK_EQUAL(face->m_sentInterests[0].getExclude().toUri(), "lunch-talk");
-}
-
-BOOST_FIXTURE_TEST_CASE(onDiscoveryInterest, Fixture)
-{
-  face->m_sentInterests.clear();
-  face->m_sentDatas.clear();
-
-  Interest discovery(ChatroomDiscoveryLogic::DISCOVERY_PREFIX);
-  discovery.setMustBeFresh(true);
-  discovery.setInterestLifetime(time::milliseconds(10000));
-
-  Exclude exclude;
-  exclude.excludeOne(ndn::Name::Component("lunch-talk"));
-  discovery.setExclude(exclude);
-
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  ChatroomInfo chatroom1;
-  chatroom1.setName(ndn::Name::Component("lunch-talk"));
-  chatroom1.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom1.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom1.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom1);
-
-  ChatroomInfo chatroom2;
-  chatroom2.setName(ndn::Name::Component("supper-talk"));
-  chatroom2.addParticipant(Name("/ndn/ucla/bob"));
-  chatroom2.addParticipant(Name("/ndn/ucla/peter"));
-  chatroom2.setTrustModel(ChatroomInfo::TRUST_MODEL_HIERARCHICAL);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom2);
-
-  //discovery
-  chatroomDiscoveryLogic.onDiscoveryInterest(ChatroomDiscoveryLogic::DISCOVERY_PREFIX, discovery);
-
-  face->processEvents(time::milliseconds(100));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 1);//the interest is for nfd register
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 1);
-
-  ChatroomInfo chatroom;
-  chatroom.wireDecode(face->m_sentDatas[0].getContent().blockFromValue());
-  chatroom.setName(face->m_sentDatas[0].getName()
-                                      .get(ChatroomDiscoveryLogic::OFFSET_CHATROOM_NAME));
-
-  BOOST_CHECK_EQUAL(chatroom.getName(), chatroom2.getName());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants().size(),
-                    chatroom2.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(),
-                    chatroom2.getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(),
-                    chatroom2.getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(),
-                    chatroom2.getTrustModel());
-
-  //refreshing
-  face->m_sentInterests.clear();
-  face->m_sentDatas.clear();
-
-  Name name = ChatroomDiscoveryLogic::DISCOVERY_PREFIX;
-  name.append(Name("supper-talk"));
-
-  Interest refreshing(name);
-  refreshing.setMustBeFresh(true);
-  refreshing.setInterestLifetime(time::milliseconds(10000));
-
-  chatroomDiscoveryLogic.onDiscoveryInterest(name, refreshing);
-  face->processEvents(time::milliseconds(100));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 0);
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 1);
-
-  chatroom.wireDecode(face->m_sentDatas[0].getContent().blockFromValue());
-  chatroom.setName(face->m_sentDatas[0].getName()
-                                      .get(ChatroomDiscoveryLogic::OFFSET_CHATROOM_NAME));
-
-  BOOST_CHECK_EQUAL(chatroom.getName(), chatroom2.getName());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants().size(),
-                    chatroom2.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(),
-                    chatroom2.getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(),
-                    chatroom2.getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(),
-                    chatroom2.getTrustModel());
-}
-
-BOOST_FIXTURE_TEST_CASE(refreshChatroomFunction, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  ChatroomInfo chatroom1;
-  chatroom1.setName(ndn::Name::Component("lunch-talk"));
-  chatroom1.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom1.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom1.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-  chatroomDiscoveryLogic.addLocalChatroom(chatroom1);
-
-  chatroomDiscoveryLogic.refreshChatroom(ndn::Name::Component("lunch-talk"));
-  face->processEvents(time::milliseconds(100));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests.size(), 2);
-  BOOST_CHECK_EQUAL(face->m_sentDatas.size(), 0);
-
-  Name name = ChatroomDiscoveryLogic::DISCOVERY_PREFIX;
-  name.append(Name("lunch-talk"));
-
-  BOOST_CHECK_EQUAL(face->m_sentInterests[1].getName().toUri(), name.toUri());
-  BOOST_CHECK_EQUAL(face->m_sentInterests[1].getExclude().size(), 0);
-}
-
-BOOST_FIXTURE_TEST_CASE(onReceiveData, Fixture)
-{
-  ChatroomDiscoveryLogic chatroomDiscoveryLogic(face, bind(&Fixture::update, this, _1, _2));
-
-  //discovery
-  Interest discovery(ChatroomDiscoveryLogic::DISCOVERY_PREFIX);
-  discovery.setMustBeFresh(true);
-  discovery.setInterestLifetime(time::milliseconds(10000));
-
-  Name dataName(ChatroomDiscoveryLogic::DISCOVERY_PREFIX);
-  dataName.append(ndn::Name::Component("lunch-talk"));
-
-  ChatroomInfo chatroom1;
-  chatroom1.setName(ndn::Name::Component("lunch-talk"));
-  chatroom1.addParticipant(Name("/ndn/ucla/ymj"));
-  chatroom1.addParticipant(Name("/ndn/ucla/alice"));
-  chatroom1.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
-
-  shared_ptr<Data> chatroomInfo = make_shared<Data>(dataName);
-  chatroomInfo->setFreshnessPeriod(time::seconds(10));
-  chatroomInfo->setContent(chatroom1.wireEncode());
-
-  chatroomDiscoveryLogic.onReceiveData(discovery, *chatroomInfo, false);
-
-  face->processEvents(time::milliseconds(1000));
-
-  ndn::Name::Component chatroomName("lunch-talk");
-
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 1);
-  BOOST_CHECK_EQUAL(chatroom1.getName(),
-                    chatroomDiscoveryLogic.getChatrooms().find(chatroomName)
-                    ->second.getName());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants().size(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants()[0].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants()[1].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom1.getTrustModel(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getTrustModel());
-
-  //refreshing
-  Name name = ChatroomDiscoveryLogic::DISCOVERY_PREFIX;
-  name.append(Name("lunch-talk"));
-
-  Interest refreshing(name);
-  refreshing.setMustBeFresh(true);
-  refreshing.setInterestLifetime(time::milliseconds(10000));
-
-  chatroomDiscoveryLogic.onReceiveData(discovery, *chatroomInfo, false);
-
-  face->processEvents(time::milliseconds(1000));
-
-  BOOST_CHECK_EQUAL(chatroomDiscoveryLogic.getChatrooms().size(), 1);
-  BOOST_CHECK_EQUAL(chatroom1.getName(),
-                    chatroomDiscoveryLogic.getChatrooms().find(chatroomName)
-                    ->second.getName());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants().size(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants()[0].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom1.getParticipants()[1].toUri(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second
-                    .getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom1.getTrustModel(),
-                    chatroomDiscoveryLogic
-                    .getChatrooms().find(chatroomName)->second.getTrustModel());
-}
-
-BOOST_AUTO_TEST_SUITE_END()
-
-} // namespace test
-
-} // namespace chronos
diff --git a/test/test-chatroom-info.cpp b/test/test-chatroom-info.cpp
index a1b444e..39a5006 100644
--- a/test/test-chatroom-info.cpp
+++ b/test/test-chatroom-info.cpp
@@ -11,10 +11,19 @@
 BOOST_AUTO_TEST_SUITE(TestChatroomInfo)
 
 const uint8_t chatroomInfo[] = {
-  0x81, 0x2d, // ChatroomInfo
+  0x80, 0x5d, // ChatroomInfo
+    0x81, 0x06, // ChatroomName
+      0x08, 0x04,
+        0x06e, 0x64, 0x6e, 0x64,
     0x82, 0x01, // TrustModel
       0x01,
-    0x80, 0x14,// Participant1
+    0x83, 0x12, // ChatroomPrefix
+      0x07, 0x10,
+        0x08, 0x03,
+          0x6e, 0x64, 0x6e,
+        0x08, 0x09,
+          0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+    0x84, 0x14, // ManagerPrefix
       0x07, 0x12,
         0x08, 0x03,
           0x6e, 0x64, 0x6e,
@@ -22,7 +31,14 @@
           0x75, 0x63, 0x6c, 0x61,
         0x08, 0x05,
           0x61, 0x6c, 0x69, 0x63, 0x65,
-    0x80, 0x12, // Participant2
+    0x85, 0x26,// Participants
+      0x07, 0x12,
+        0x08, 0x03,
+          0x6e, 0x64, 0x6e,
+        0x08, 0x04,
+          0x75, 0x63, 0x6c, 0x61,
+        0x08, 0x05,
+          0x61, 0x6c, 0x69, 0x63, 0x65,
       0x07, 0x10,
         0x08, 0x03,
           0x6e, 0x64, 0x6e,
@@ -34,17 +50,41 @@
 
 BOOST_AUTO_TEST_CASE(EncodeChatroom)
 {
-  //Chatroom := CHATROOM-TYPE TLV-LENGTH
-  //              TrustModel
-  //              Participant+
+
+  // ChatroomInfo := CHATROOM-INFO-TYPE TLV-LENGTH
+  //                   ChatroomName
+  //                   TrustModel
+  //                   ChatroomPrefix
+  //                   ManagerPrefix
+  //                   Participants
+  //
+  // ChatroomName := CHATROOM-NAME-TYPE TLV-LENGTH
+  //                   NameComponent
+  //
+  // TrustModel := TRUST-MODEL-TYPE TLV-LENGTH
+  //                 nonNegativeInteger
+  //
+  // ChatroomPrefix := CHATROOM-PREFIX-TYPE TLV-LENGTH
+  //                     Name
+  //
+  // ManagerPrefix := MANAGER-PREFIX-TYPE TLV-LENGTH
+  //                    Name
+  //
+  // Participants := PARTICIPANTS-TYPE TLV-LENGTH
+  //                   Name+
 
   ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
+  chatroom.setName(ndn::Name::Component("ndnd"));
+  chatroom.setManager("/ndn/ucla/alice");
+  chatroom.setSyncPrefix("/ndn/broadcast");
   chatroom.addParticipant(Name("/ndn/ucla/alice"));
   chatroom.addParticipant(Name("/ndn/ucla/ymj"));
+  chatroom.addParticipant(Name("/ndn/ucla"));
+  chatroom.removeParticipant(Name("/ndn/ucla"));
   chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
 
   const Block& encoded = chatroom.wireEncode();
+
   Block chatroomInfoBlock(chatroomInfo, sizeof(chatroomInfo));
 
   BOOST_CHECK_EQUAL_COLLECTIONS(chatroomInfoBlock.wire(),
@@ -56,7 +96,9 @@
 BOOST_AUTO_TEST_CASE(DecodeChatroomCorrect)
 {
   ChatroomInfo chatroom;
-  chatroom.setName(ndn::Name::Component("lunch-talk"));
+  chatroom.setName(ndn::Name::Component("ndnd"));
+  chatroom.setManager("/ndn/ucla/alice");
+  chatroom.setSyncPrefix("/ndn/broadcast");
   chatroom.addParticipant(Name("/ndn/ucla/alice"));
   chatroom.addParticipant(Name("/ndn/ucla/ymj"));
   chatroom.setTrustModel(ChatroomInfo::TRUST_MODEL_WEBOFTRUST);
@@ -64,22 +106,33 @@
   Block chatroomInfoBlock(chatroomInfo, sizeof(chatroomInfo));
   ChatroomInfo dechatroom;
   dechatroom.wireDecode(chatroomInfoBlock);
-  dechatroom.setName(ndn::Name::Component("lunch-talk"));
 
   BOOST_CHECK_EQUAL(chatroom.getName(), dechatroom.getName());
+  BOOST_CHECK_EQUAL(chatroom.getSyncPrefix().toUri(), dechatroom.getSyncPrefix().toUri());
+  BOOST_CHECK_EQUAL(chatroom.getManagerPrefix().toUri(), dechatroom.getManagerPrefix().toUri());
   BOOST_CHECK_EQUAL(chatroom.getParticipants().size(), dechatroom.getParticipants().size());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[0].toUri(), dechatroom.getParticipants()[0].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getParticipants()[1].toUri(), dechatroom.getParticipants()[1].toUri());
-  BOOST_CHECK_EQUAL(chatroom.getTrustModel(), dechatroom.getTrustModel());
+  BOOST_CHECK_EQUAL(chatroom.getParticipants().begin()->toUri(),
+                    dechatroom.getParticipants().begin()->toUri());
+  BOOST_CHECK_EQUAL(chatroom.getParticipants().begin()->toUri(),
+                    dechatroom.getParticipants().begin()->toUri());
 }
 
 BOOST_AUTO_TEST_CASE(DecodeChatroomError)
 {
   const uint8_t error1[] = {
-    0x80, 0x2d, // Wrong ChatroomInfo Type (0x81, 0x2d)
+    0x81, 0x5d, // ChatroomInfo Type Error
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
       0x82, 0x01, // TrustModel
         0x01,
-      0x80, 0x14,// Participant1
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x84, 0x14, // ManagerPrefix
         0x07, 0x12,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -87,7 +140,14 @@
             0x75, 0x63, 0x6c, 0x61,
           0x08, 0x05,
             0x61, 0x6c, 0x69, 0x63, 0x65,
-      0x80, 0x12, // Participant2
+      0x85, 0x26,// Participants
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
         0x07, 0x10,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -101,10 +161,19 @@
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock1), ChatroomInfo::Error);
 
   const uint8_t error2[] = {
-    0x81, 0x2d, // ChatroomInfo
-      0x81, 0x01, // Wrong TrustModel Type (0x82, 0x01)
+    0x80, 0x5d, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
+      0x83, 0x01, // TrustModel Type Error
         0x01,
-      0x80, 0x14,// Participant1
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x84, 0x14, // ManagerPrefix
         0x07, 0x12,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -112,7 +181,14 @@
             0x75, 0x63, 0x6c, 0x61,
           0x08, 0x05,
             0x61, 0x6c, 0x69, 0x63, 0x65,
-      0x80, 0x12, // Participant2
+      0x85, 0x26,// Participants
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
         0x07, 0x10,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -126,10 +202,19 @@
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock2), ChatroomInfo::Error);
 
   const uint8_t error3[] = {
-    0x81, 0x2d, // ChatroomInfo
+    0x80, 0x5d, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
       0x82, 0x01, // TrustModel
         0x01,
-      0x80, 0x14,// Participant1
+      0x80, 0x12, // ChatroomPrefix Type Error
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x84, 0x14, // ManagerPrefix
         0x07, 0x12,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -137,7 +222,14 @@
             0x75, 0x63, 0x6c, 0x61,
           0x08, 0x05,
             0x61, 0x6c, 0x69, 0x63, 0x65,
-      0x81, 0x12, // Wrong Participant Type (0x80, 0x12)
+      0x85, 0x26,// Participants
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
         0x07, 0x10,
           0x08, 0x03,
             0x6e, 0x64, 0x6e,
@@ -151,25 +243,116 @@
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock3), ChatroomInfo::Error);
 
   const uint8_t error4[] = {
-    0x81, 0x00 // Empty ChatroomInfo
+    0x80, 0x5d, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
+      0x82, 0x01, // TrustModel
+        0x01,
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x80, 0x14, // ManagerPrefix Error Type
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
+      0x85, 0x26,// Participants
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x03,
+            0x79, 0x6d, 0x6a
   };
 
   Block errorBlock4(error4, sizeof(error4));
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock4), ChatroomInfo::Error);
 
   const uint8_t error5[] = {
-    0x81, 0x03, // ChatroomInfo
+    0x80, 0x5d, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
       0x82, 0x01, // TrustModel
-        0x01
-    //zero Participant
+        0x01,
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+      0x84, 0x14, // ManagerPrefix
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
+      0x80, 0x26,// Participants Error Type
+        0x07, 0x12,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x05,
+            0x61, 0x6c, 0x69, 0x63, 0x65,
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x04,
+            0x75, 0x63, 0x6c, 0x61,
+          0x08, 0x03,
+            0x79, 0x6d, 0x6a
   };
 
   Block errorBlock5(error5, sizeof(error5));
   BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock5), ChatroomInfo::Error);
+
+  const uint8_t error6[] = {
+    0x80, 0x00 // Empty ChatroomInfo
+  };
+
+  Block errorBlock6(error6, sizeof(error6));
+  BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock6), ChatroomInfo::Error);
+
+  const uint8_t error7[] = {
+    0x80, 0x1f, // ChatroomInfo
+      0x81, 0x06, // ChatroomName
+        0x08, 0x04,
+          0x06e, 0x64, 0x6e, 0x64,
+      0x82, 0x01, // TrustModel
+        0x01,
+      0x83, 0x12, // ChatroomPrefix
+        0x07, 0x10,
+          0x08, 0x03,
+            0x6e, 0x64, 0x6e,
+          0x08, 0x09,
+            0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
+    // no Participant
+  };
+
+  Block errorBlock7(error7, sizeof(error7));
+  BOOST_CHECK_THROW(ChatroomInfo chatroom(errorBlock7), ChatroomInfo::Error);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
 
-} //namespace test
+} // namespace test
 
-} //namespace chronos
+} // namespace chronos
