diff --git a/src/contact-item.cpp b/src/contact-item.cpp
index 08f4fa6..c14b328 100644
--- a/src/contact-item.cpp
+++ b/src/contact-item.cpp
@@ -13,10 +13,14 @@
 
 #include <ndn.cxx/fields/signature-sha256-with-rsa.h>
 
+#include "logging.h"
+
 using namespace std;
 using namespace ndn;
 using namespace ndn::security;
 
+INIT_LOGGER("ContactItem");
+
 ContactItem::ContactItem(const EndorseCertificate& selfEndorseCertificate,
                          const string& alias)
   : m_selfEndorseCertificate(selfEndorseCertificate)
@@ -24,8 +28,31 @@
   Name endorsedkeyName = selfEndorseCertificate.getPublicKeyName();
   Ptr<const signature::Sha256WithRsa> endorseSig = boost::dynamic_pointer_cast<const signature::Sha256WithRsa>(selfEndorseCertificate.getSignature());
   const Name& signingKeyName = endorseSig->getKeyLocator().getKeyName();
+  
+  int i = 0;
+  int j = -1;
+  string keyString("KEY");
+  string idString("ID-CERT");
+  for(; i < signingKeyName.size(); i++)
+    {
+      if(keyString == signingKeyName.get(i).toUri())
+        j = i;
+      if(idString == signingKeyName.get(i).toUri())
+        break;
+    }
 
-  if(endorsedkeyName != signingKeyName)
+  if(i >= signingKeyName.size() || j < 0)
+    throw LnException("Wrong name!");
+
+  Name subName = signingKeyName.getSubName(0, j);
+  subName.append(signingKeyName.getSubName(j+1, i-j-1));
+
+
+
+  // _LOG_DEBUG("endorsedkeyName " << endorsedkeyName.toUri());
+  // _LOG_DEBUG("subKeyName " << subName.toUri());
+
+  if(endorsedkeyName != subName)
     throw LnException("not a self-claimed");
 
   m_namespace = endorsedkeyName.getSubName(0, endorsedkeyName.size() - 1);
