diff --git a/src/communication/nlsr_im.cpp b/src/communication/nlsr_im.cpp
index 7495265..de551bb 100644
--- a/src/communication/nlsr_im.cpp
+++ b/src/communication/nlsr_im.cpp
@@ -186,15 +186,34 @@
     void
     interestManager::processInterestKeys(Nlsr& pnlsr,const ndn::Interest &interest)
     {
-        cout<<" processInterestKeys called "<<endl;
-        ndn::shared_ptr<ndn::IdentityCertificate> cert=pnlsr.getKeyManager().getCertificate("dummy");
+        cout<<"processInterestKeys called "<<endl;
+        string intName=interest.getName().toUri();
+        cout<<"Interest Name for Key: "<<intName<<std::endl;
+        nlsrTokenizer nt(intName,"/");
+        std::string certName=nt.getTokenString(0,nt.getTokenNumber()-2);
+        uint32_t seqNum=boost::lexical_cast<uint32_t>(nt.getToken(nt.getTokenNumber()-1));
+        cout<<"Cert Name: "<<certName<<" Seq Num: "<<seqNum<<std::endl;
+        std::pair<ndn::shared_ptr<ndn::IdentityCertificate>, bool> chkCert=
+                pnlsr.getKeyManager().getCertificateFromStore(certName,seqNum);
+        if( chkCert.second )
+        {
+           Data data(ndn::Name(interest.getName()).appendVersion()); 
+           data.setFreshnessPeriod(1000); //10 sec
+           data.setContent(chkCert.first->wireEncode());
+           pnlsr.getKeyManager().signData(data);
+           pnlsr.getNlsrFace()->put(data);
+        }
+        //std::pair<ndn::shared_ptr<ndn::IdentityCertificate>, bool> chkCert=
+        /*
+        ndn::shared_ptr<ndn::IdentityCertificate> cert=pnlsr.getKeyManager().getCertificate();
         Data data(ndn::Name(interest.getName()).appendVersion());
         data.setFreshnessPeriod(1000); // 10 sec
         data.setContent(cert->wireEncode());
         pnlsr.getKeyManager().signData(data);
-        std::ofstream outFile("data_sent");
-        ndn::io::save(data,outFile,ndn::io::NO_ENCODING);
+        //std::ofstream outFile("data_sent");
+        //ndn::io::save(data,outFile,ndn::io::NO_ENCODING);
         pnlsr.getNlsrFace()->put(data);
+        */ 
     }
 
 
