diff --git a/src/contact-item.cpp b/src/contact-item.cpp
new file mode 100644
index 0000000..08f4fa6
--- /dev/null
+++ b/src/contact-item.cpp
@@ -0,0 +1,40 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ *                     Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#include "contact-item.h"
+#include "exception.h"
+
+#include <ndn.cxx/fields/signature-sha256-with-rsa.h>
+
+using namespace std;
+using namespace ndn;
+using namespace ndn::security;
+
+ContactItem::ContactItem(const EndorseCertificate& selfEndorseCertificate,
+                         const string& alias)
+  : m_selfEndorseCertificate(selfEndorseCertificate)
+{
+  Name endorsedkeyName = selfEndorseCertificate.getPublicKeyName();
+  Ptr<const signature::Sha256WithRsa> endorseSig = boost::dynamic_pointer_cast<const signature::Sha256WithRsa>(selfEndorseCertificate.getSignature());
+  const Name& signingKeyName = endorseSig->getKeyLocator().getKeyName();
+
+  if(endorsedkeyName != signingKeyName)
+    throw LnException("not a self-claimed");
+
+  m_namespace = endorsedkeyName.getSubName(0, endorsedkeyName.size() - 1);
+  m_alias = alias.empty() ? m_namespace.toUri() : alias;
+
+  Ptr<ProfileData> profileData = selfEndorseCertificate.getProfileData();
+  Ptr<const Blob> nameBlob = profileData->getProfile().getProfileEntry("name");
+  m_name = string(nameBlob->buf(), nameBlob->size());
+  Ptr<const Blob> institutionBlob = profileData->getProfile().getProfileEntry("institution");
+  m_institution = string(institutionBlob->buf(), institutionBlob->size());
+}
+
diff --git a/src/contact-item.h b/src/contact-item.h
new file mode 100644
index 0000000..2940693
--- /dev/null
+++ b/src/contact-item.h
@@ -0,0 +1,54 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ *                     Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#ifndef CONTACT_ITEM_H
+#define CONTACT_ITEM_H
+
+#include <ndn.cxx/data.h>
+#include <vector>
+#include "endorse-certificate.h"
+
+class ContactItem
+{
+  typedef std::vector<Ptr<EndorseCertificate> > EndorseCertificateList;
+
+public:
+  ContactItem(const EndorseCertificate& selfEndorseCertificate,
+              const std::string& alias = std::string());
+  
+  ~ContactItem() {}
+
+  const ndn::Name&
+  getNameSpace() const
+  { return m_namespace; }
+
+  const std::string&
+  getAlias() const
+  { return m_alias; }
+
+  const std::string&
+  getName() const
+  { return m_name; }
+
+  const std::string&
+  getInstitution() const
+  { return m_institution; }
+
+private:
+  EndorseCertificate m_selfEndorseCertificate;
+
+  ndn::Name m_namespace;
+  std::string m_alias;
+
+  std::string m_name;
+  std::string m_institution;
+};
+
+#endif
diff --git a/src/profile.cpp b/src/profile.cpp
index 182fe77..06282af 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -42,10 +42,10 @@
 { m_entries[profileType] = profileValue; }
 
 Ptr<const Blob>
-Profile::getProfileEntry(const string& profileType)
+Profile::getProfileEntry(const string& profileType) const
 {
   if(m_entries.find(profileType) != m_entries.end())
-      return Ptr<Blob>(new Blob(m_entries[profileType].buf(), m_entries[profileType].size()));
+    return Ptr<Blob>(new Blob(m_entries.at(profileType).buf(), m_entries.at(profileType).size()));
 
   return NULL;
 }
diff --git a/src/profile.h b/src/profile.h
index 403b600..0f5a5cc 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -41,7 +41,7 @@
                   const ndn::Blob& profileValue);
   
   ndn::Ptr<const ndn::Blob>
-  getProfileEntry(const std::string& profileType);
+  getProfileEntry(const std::string& profileType) const;
 
   inline Profile::iterator
   begin()
