diff --git a/src/invitation-policy-manager.cpp b/src/invitation-policy-manager.cpp
index ca4ae5b..58c9fcc 100644
--- a/src/invitation-policy-manager.cpp
+++ b/src/invitation-policy-manager.cpp
@@ -21,9 +21,11 @@
 INIT_LOGGER("InvitationPolicyManager");
 
 InvitationPolicyManager::InvitationPolicyManager(const string& chatroomName,
-                                             int stepLimit,
-					     Ptr<CertificateCache> certificateCache)
+                                                 const Name& signingIdentity,
+                                                 int stepLimit,
+                                                 Ptr<CertificateCache> certificateCache)
   : m_chatroomName(chatroomName)
+  , m_signingIdentity(signingIdentity)
   , m_stepLimit(stepLimit)
   , m_certificateCache(certificateCache)
 {
@@ -62,7 +64,7 @@
 {
   if(m_stepLimit == stepCount)
     {
-      _LOG_DEBUG("reach the maximum steps of verification");
+      _LOG_ERROR("Reach the maximum steps of verification!");
       unverifiedCallback(data);
       return NULL;
     }
@@ -71,6 +73,7 @@
 
   if(KeyLocator::KEYNAME != sha256sig->getKeyLocator().getType())
     {
+      _LOG_ERROR("KeyLocator is not name!");
       unverifiedCallback(data);
       return NULL;
     }
@@ -102,8 +105,6 @@
 	return NULL;
       }
 
-      _LOG_DEBUG("KeyLocator has not been cached and validated!");
-
       DataCallback recursiveVerifiedCallback = boost::bind(&InvitationPolicyManager::onDskCertificateVerified, 
                                                            this, 
                                                            _1, 
@@ -131,17 +132,13 @@
 
   if(m_kskRegex->match(data->getName()))
     {
-      _LOG_DEBUG("is ksk");
       Name keyName = m_kskRegex->expand();
-      _LOG_DEBUG("ksk name: " << keyName.toUri());
       map<Name, Publickey>::iterator it = m_trustAnchors.find(keyName);
       if(m_trustAnchors.end() != it)
         {
-          _LOG_DEBUG("found key!");
           Ptr<IdentityCertificate> identityCertificate = Ptr<IdentityCertificate>(new IdentityCertificate(*data));
           if(it->second.getKeyBlob() == identityCertificate->getPublicKeyInfo().getKeyBlob())
             {
-              _LOG_DEBUG("same key!");
               verifiedCallback(data);
             }
           else
@@ -177,15 +174,13 @@
 InvitationPolicyManager::checkSigningPolicy(const Name& dataName, 
 					  const Name& certificateName)
 {
-  //TODO:
   return true;
 }
     
 Name 
 InvitationPolicyManager::inferSigningIdentity(const Name& dataName)
 {
-  //TODO:
-  return Name();
+  return m_signingIdentity;
 }
 
 void
@@ -215,9 +210,9 @@
 
 void 
 InvitationPolicyManager::onDskCertificateVerified(Ptr<Data> certData, 
-					     Ptr<Data> originalData,
-					     const DataCallback& verifiedCallback, 
-					     const UnverifiedCallback& unverifiedCallback)
+                                                  Ptr<Data> originalData,
+                                                  const DataCallback& verifiedCallback, 
+                                                  const UnverifiedCallback& unverifiedCallback)
 {
   Ptr<IdentityCertificate> certificate = Ptr<IdentityCertificate>(new IdentityCertificate(*certData));
 
