diff --git a/src/addcontactpanel.cpp b/src/addcontactpanel.cpp
index 8ce77c8..bea8d7f 100644
--- a/src/addcontactpanel.cpp
+++ b/src/addcontactpanel.cpp
@@ -152,15 +152,9 @@
 {
   m_currentEndorseCertificate = Ptr<EndorseCertificate>(new EndorseCertificate(endorseCertificate));
 
-  const Blob& keyBlob = endorseCertificate.getPublicKeyInfo().getKeyBlob();
-  string encoded;
-  CryptoPP::StringSource ss(reinterpret_cast<const unsigned char *>(keyBlob.buf()), keyBlob.size(), true,
-                            new CryptoPP::Base64Encoder(new CryptoPP::StringSink(encoded), true, 64));
-  
-  ui->infoView->setColumnCount(1);  
-  ui->infoView->insertRow(0);  
-  QTableWidgetItem *keyBits = new QTableWidgetItem(QString::fromUtf8(encoded.c_str()));
-  ui->infoView->setItem(0, 0, keyBits);
+  m_currentCollectEndorseReady = NULL;
+
+  displayContactInfo();
 }
 
 void
diff --git a/src/addcontactpanel.ui b/src/addcontactpanel.ui
index 1955964..fb6f4fa 100644
--- a/src/addcontactpanel.ui
+++ b/src/addcontactpanel.ui
@@ -50,7 +50,7 @@
       <item>
        <widget class="QPushButton" name="searchButton">
         <property name="text">
-         <string>Search</string>
+         <string>Fetch</string>
         </property>
         <property name="autoDefault">
          <bool>false</bool>
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index de3a9ca..71b9ea2 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -185,13 +185,8 @@
 ContactManager::onKeyVerified(Ptr<Data> data, const Name& identity)
 {
   IdentityCertificate identityCertificate(*data);
-  Name keyName = identityCertificate.getPublicKeyName();
-  Profile profile(keyName.getPrefix(keyName.size()-1), 
-                  keyName.get(-2).toUri(),
-                  keyName.getPrefix(keyName.size()-2).toUri());
-  
-  Ptr<ProfileData> profileData = Ptr<ProfileData>(new ProfileData(keyName.getPrefix(keyName.size()-1),
-                                                                  profile));
+
+  Ptr<ProfileData> profileData = Ptr<ProfileData>(new ProfileData(Profile(identityCertificate)));
   
   Ptr<IdentityManager> identityManager = m_keychain->getIdentityManager();
   Name certificateName = identityManager->getDefaultCertificateName ();
@@ -313,7 +308,7 @@
   if(0 == certificateName.size())
     return NULL;
 
-  Ptr<ProfileData> profileData = Ptr<ProfileData>(new ProfileData(identity, profile));
+  Ptr<ProfileData> profileData = Ptr<ProfileData>(new ProfileData(profile));
   identityManager->signByCertificate(*profileData, certificateName);
 
   Ptr<security::IdentityCertificate> signingCert = identityManager->getCertificate(certificateName);
diff --git a/src/profile-data.cpp b/src/profile-data.cpp
index 9a8087b..ef067f9 100644
--- a/src/profile-data.cpp
+++ b/src/profile-data.cpp
@@ -19,13 +19,12 @@
 
 INIT_LOGGER("ProfileData");
 
-ProfileData::ProfileData(const Name& identity,
-			 const Profile& profile)
+ProfileData::ProfileData(const Profile& profile)
   : Data()
-  , m_identity(identity)
+  , m_identity(profile.getIdentityName())
   , m_profile(profile)
 {
-  Name dataName = identity;
+  Name dataName = m_identity;
 
   dataName.append("PROFILE").appendVersion();
   setName(dataName);
diff --git a/src/profile-data.h b/src/profile-data.h
index 4c2ac71..9c8e184 100644
--- a/src/profile-data.h
+++ b/src/profile-data.h
@@ -17,8 +17,7 @@
 class ProfileData : public ndn::Data
 {
 public:
-  ProfileData(const ndn::Name& identity,
-              const Profile& profile);
+  ProfileData(const Profile& profile);
 
   ProfileData(const ProfileData& profileData);
 
diff --git a/src/profile.cpp b/src/profile.cpp
index e5c5325..5261207 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -18,6 +18,48 @@
 using namespace ndn;
 
 INIT_LOGGER("Profile");
+
+static string nameOid("2.5.4.41");
+static string orgOid("2.5.4.11");
+static string groupOid("2.5.4.1");
+static string homepageOid("2.5.4.3");
+static string advisor("2.5.4.80");
+static string emailOid("1.2.840.113549.1.9.1");
+
+Profile::Profile(security::IdentityCertificate& identityCertificate)
+{
+  using namespace ndn::security;
+
+  Name keyName = identityCertificate.getPublicKeyName();
+  m_identityName = keyName.getPrefix(keyName.size()-1);
+
+  const string& identityString = m_identityName.toUri();
+  Blob identityBlob (identityString.c_str(), identityString.size());
+  m_entries[string("IDENTITY")] = identityBlob;
+  
+  const vector<CertificateSubDescrypt>& subList = identityCertificate.getSubjectDescriptionList();
+  vector<CertificateSubDescrypt>::const_iterator it = subList.begin();
+  for(; it != subList.end(); it++)
+    {
+      string oidStr = it->getOidStr();
+      Blob blob (it->getValue().c_str(), it->getValue().size());
+      if(oidStr == nameOid)
+        m_entries[string("name")] = blob;
+      else if(oidStr == orgOid)
+        m_entries[string("institution")] = blob;
+      else if(oidStr == groupOid)
+        m_entries[string("group")] = blob;
+      else if(oidStr == homepageOid)
+        m_entries[string("homepage")] = blob;
+      else if(oidStr == advisor)
+        m_entries[string("advisor")] = blob;
+      else if(oidStr == emailOid)
+        m_entries[string("email")] = blob;
+      else
+        m_entries[oidStr] = blob;
+    }
+}
+
 Profile::Profile(const Name& identityName)
   : m_identityName(identityName)
 {
diff --git a/src/profile.h b/src/profile.h
index 5c9ce24..b020408 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -14,6 +14,7 @@
 #include <ndn.cxx/common.h>
 #include <ndn.cxx/fields/name.h>
 #include <ndn.cxx/fields/blob.h>
+#include <ndn.cxx/security/certificate/identity-certificate.h>
 #include <map>
 #include <string>
 
@@ -25,6 +26,8 @@
 public:
   Profile() {}
 
+  Profile(ndn::security::IdentityCertificate& identityCertificate);
+
   Profile(const ndn::Name& identityName);
 
   Profile(const ndn::Name& identityName,
@@ -69,6 +72,10 @@
   getEntries() const
   { return m_entries; }
 
+  inline const ndn::Name&
+  getIdentityName() const
+  { return m_identityName; }
+
 protected:
   ndn::Name m_identityName;
   std::map<std::string, ndn::Blob> m_entries;
