diff --git a/src/handles/base-handle.hpp b/src/handles/base-handle.hpp
index 3223940..3048856 100644
--- a/src/handles/base-handle.hpp
+++ b/src/handles/base-handle.hpp
@@ -22,7 +22,7 @@
 
 #include "common.hpp"
 
-#include "storage/storage-handle.hpp"
+#include "storage/repo-storage.hpp"
 #include "repo-command-response.hpp"
 #include "repo-command-parameter.hpp"
 
@@ -30,7 +30,6 @@
 
 class BaseHandle : noncopyable
 {
-
 public:
   class Error : std::runtime_error
   {
@@ -43,11 +42,13 @@
   };
 
 public:
-  BaseHandle(Face& face, StorageHandle& storageHandle, KeyChain& keyChain, Scheduler& scheduler)
+  BaseHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
+             Scheduler& scheduler)
     : m_face(face)
     , m_storageHandle(storageHandle)
     , m_keyChain(keyChain)
     , m_scheduler(scheduler)
+   // , m_storeindex(storeindex)
   {
   }
 
@@ -62,7 +63,7 @@
     return m_face;
   }
 
-  inline StorageHandle&
+  inline RepoStorage&
   getStorageHandle()
   {
     return m_storageHandle;
@@ -73,7 +74,13 @@
   {
     return m_scheduler;
   }
-
+/*
+  inline RepoStorage&
+  getStoreIndex()
+  {
+    return m_storeindex;
+  }
+*/
   uint64_t
   generateProcessId();
 
@@ -94,9 +101,10 @@
 private:
 
   Face& m_face;
-  StorageHandle& m_storageHandle;
+  RepoStorage& m_storageHandle;
   KeyChain& m_keyChain;
   Scheduler& m_scheduler;
+ // RepoStorage& m_storeindex;
 };
 
 inline void
diff --git a/src/handles/delete-handle.cpp b/src/handles/delete-handle.cpp
index ad4a474..c6ad7c5 100644
--- a/src/handles/delete-handle.cpp
+++ b/src/handles/delete-handle.cpp
@@ -21,8 +21,9 @@
 
 namespace repo {
 
-DeleteHandle::DeleteHandle(Face& face, StorageHandle& storageHandle, KeyChain& keyChain,
-                           Scheduler& scheduler, ValidatorConfig& validator)
+DeleteHandle::DeleteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
+                           Scheduler& scheduler,// RepoStorage& storeindex,
+                           ValidatorConfig& validator)
   : BaseHandle(face, storageHandle, keyChain, scheduler)
   , m_validator(validator)
 {
@@ -35,11 +36,6 @@
                        bind(&DeleteHandle::onValidationFailed, this, _1, _2));
 }
 
-void
-DeleteHandle::onRegisterSuccess(const Name& prefix)
-{
-  std::cerr << "Successfully registered prefix " << prefix << std::endl;
-}
 
 void
 DeleteHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
@@ -101,13 +97,14 @@
   std::cerr << reason << std::endl;
   negativeReply(*interest, 401);
 }
-
+//listen change the setinterestfilter
 void
 DeleteHandle::listen(const Name& prefix)
 {
-  getFace().setInterestFilter(Name(prefix).append("delete"),
+  ndn::Name deleteprefix = Name(prefix).append("delete");
+  ndn::InterestFilter filter(deleteprefix);
+  getFace().setInterestFilter(filter,
                               bind(&DeleteHandle::onInterest, this, _1, _2),
-                              bind(&DeleteHandle::onRegisterSuccess, this, _1),
                               bind(&DeleteHandle::onRegisterFailed, this, _1, _2));
 }
 
@@ -139,31 +136,28 @@
 DeleteHandle::processSingleDeleteCommand(const Interest& interest,
                                          RepoCommandParameter& parameter)
 {
-  uint64_t nDeletedDatas = 0;
-  if (getStorageHandle().deleteData(parameter.getName())) {
-    nDeletedDatas++;
+  int64_t nDeletedDatas = getStorageHandle().deleteData(parameter.getName());
+  if (nDeletedDatas == -1) {
+    std::cerr << "Deletion Failed!" <<std::endl;
+    negativeReply(interest, 405); //405 means deletion fail
   }
-  positiveReply(interest, parameter, 200, nDeletedDatas);
+  else
+    positiveReply(interest, parameter, 200, nDeletedDatas);
 }
 
 void
 DeleteHandle::processSelectorDeleteCommand(const Interest& interest,
                                            RepoCommandParameter& parameter)
 {
-  uint64_t nDeletedDatas = 0;
-  Name name = parameter.getName();
-  Selectors selectors = parameter.getSelectors();
-  vector<Name> names;
-  getStorageHandle().readNameAny(name, selectors, names);
-
-  for (vector<Name>::iterator it = names.begin(); it != names.end(); ++it) {
-    if (getStorageHandle().deleteData(*it)) {
-      nDeletedDatas++;
-    }
+  int64_t nDeletedDatas = getStorageHandle()
+                            .deleteData(Interest(parameter.getName())
+                                          .setSelectors(parameter.getSelectors()));
+  if (nDeletedDatas == -1) {
+    std::cerr << "Deletion Failed!" <<std::endl;
+    negativeReply(interest, 405); //405 means deletion fail
   }
-
-  //All data has been deleted, return 200
-  positiveReply(interest, parameter, 200, nDeletedDatas);
+  else
+    positiveReply(interest, parameter, 200, nDeletedDatas);
 }
 
 void
diff --git a/src/handles/delete-handle.hpp b/src/handles/delete-handle.hpp
index 5a3b33a..4b0ac85 100644
--- a/src/handles/delete-handle.hpp
+++ b/src/handles/delete-handle.hpp
@@ -21,7 +21,7 @@
 #define REPO_HANDLES_DELETE_HANDLE_HPP
 
 #include "base-handle.hpp"
-
+#include <ndn-cxx/security/validator-config.hpp>
 namespace repo {
 
 using std::vector;
@@ -41,7 +41,7 @@
   };
 
 public:
-  DeleteHandle(Face& face, StorageHandle& storageHandle, KeyChain& keyChain,
+  DeleteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
                Scheduler& scheduler, ValidatorConfig& validator);
 
   virtual void
@@ -52,9 +52,6 @@
   onInterest(const Name& prefix, const Interest& interest);
 
   void
-  onRegisterSuccess(const Name& prefix);
-
-  void
   onRegisterFailed(const Name& prefix, const std::string& reason);
 
   void
diff --git a/src/handles/read-handle.cpp b/src/handles/read-handle.cpp
index e13a85c..83133e2 100644
--- a/src/handles/read-handle.cpp
+++ b/src/handles/read-handle.cpp
@@ -24,16 +24,11 @@
 void
 ReadHandle::onInterest(const Name& prefix, const Interest& interest)
 {
-  Data data;
-  if (getStorageHandle().readData(interest, data)) {
-    getFace().put(data);
-  }
-}
 
-void
-ReadHandle::onRegisterSuccess(const Name& prefix)
-{
-  std::cerr << "Successfully registered prefix " << prefix << std::endl;
+  shared_ptr<ndn::Data> data = getStorageHandle().readData(interest);
+  if (data != NULL) {
+      getFace().put(*data);
+  }
 }
 
 void
@@ -46,9 +41,9 @@
 void
 ReadHandle::listen(const Name& prefix)
 {
-  getFace().setInterestFilter(prefix,
+  ndn::InterestFilter filter(prefix);
+  getFace().setInterestFilter(filter,
                               bind(&ReadHandle::onInterest, this, _1, _2),
-                              bind(&ReadHandle::onRegisterSuccess, this, _1),
                               bind(&ReadHandle::onRegisterFailed, this, _1, _2));
 }
 
diff --git a/src/handles/read-handle.hpp b/src/handles/read-handle.hpp
index 7bf0484..19d2034 100644
--- a/src/handles/read-handle.hpp
+++ b/src/handles/read-handle.hpp
@@ -22,13 +22,15 @@
 
 #include "base-handle.hpp"
 
+
 namespace repo {
 
 class ReadHandle : public BaseHandle
 {
 
 public:
-  ReadHandle(Face& face, StorageHandle& storageHandle, KeyChain& keyChain, Scheduler& scheduler)
+  ReadHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
+             Scheduler& scheduler)
     : BaseHandle(face, storageHandle, keyChain, scheduler)
   {
   }
@@ -44,9 +46,6 @@
   onInterest(const Name& prefix, const Interest& interest);
 
   void
-  onRegisterSuccess(const Name& prefix);
-
-  void
   onRegisterFailed(const Name& prefix, const std::string& reason);
 };
 
diff --git a/src/handles/tcp-bulk-insert-handle.cpp b/src/handles/tcp-bulk-insert-handle.cpp
index a69dfe2..d7802ed 100644
--- a/src/handles/tcp-bulk-insert-handle.cpp
+++ b/src/handles/tcp-bulk-insert-handle.cpp
@@ -66,7 +66,7 @@
 } // namespace detail
 
 TcpBulkInsertHandle::TcpBulkInsertHandle(boost::asio::io_service& ioService,
-                                         StorageHandle& storageHandle)
+                                         RepoStorage& storageHandle)
   : m_acceptor(ioService)
   , m_storageHandle(storageHandle)
 {
diff --git a/src/handles/tcp-bulk-insert-handle.hpp b/src/handles/tcp-bulk-insert-handle.hpp
index 17233f4..ef1cbdd 100644
--- a/src/handles/tcp-bulk-insert-handle.hpp
+++ b/src/handles/tcp-bulk-insert-handle.hpp
@@ -21,7 +21,7 @@
 #define REPO_HANDLES_TCP_BULK_INSERT_HANDLE_HPP
 
 #include "common.hpp"
-#include "storage/storage-handle.hpp"
+#include "storage/repo-storage.hpp"
 
 #include <boost/asio.hpp>
 
@@ -42,7 +42,7 @@
 
 public:
   TcpBulkInsertHandle(boost::asio::io_service& ioService,
-                      StorageHandle& storageHandle);
+                      RepoStorage& storageHandle);
 
   void
   listen(const std::string& host, const std::string& port);
@@ -50,7 +50,7 @@
   void
   stop();
 
-  StorageHandle&
+  RepoStorage&
   getStorageHandle()
   {
     return m_storageHandle;
@@ -64,7 +64,7 @@
 private:
   boost::asio::ip::tcp::acceptor m_acceptor;
   boost::asio::ip::tcp::endpoint m_localEndpoint;
-  StorageHandle& m_storageHandle;
+  RepoStorage& m_storageHandle;
 };
 
 } // namespace repo
diff --git a/src/handles/write-handle.cpp b/src/handles/write-handle.cpp
index 07a5664..65098bf 100644
--- a/src/handles/write-handle.cpp
+++ b/src/handles/write-handle.cpp
@@ -26,8 +26,9 @@
 static const ndn::time::milliseconds NOEND_TIMEOUT(10000);
 static const ndn::time::milliseconds PROCESS_DELETE_TIME(10000);
 
-WriteHandle::WriteHandle(Face& face, StorageHandle& storageHandle, KeyChain& keyChain,
-                         Scheduler& scheduler, ValidatorConfig& validator)
+WriteHandle::WriteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
+                         Scheduler& scheduler,// RepoStorage& storeindex,
+                         ValidatorConfig& validator)
   : BaseHandle(face, storageHandle, keyChain, scheduler)
   , m_validator(validator)
   , m_retryTime(RETRY_TIMEOUT)
@@ -51,12 +52,6 @@
                        bind(&WriteHandle::onValidationFailed, this, _1, _2));
 }
 
-void
-WriteHandle::onRegisterSuccess(const Name& prefix)
-{
-  std::cerr << "Successfully registered prefix " << prefix << std::endl;
-}
-
 // onRegisterFailed.
 void
 WriteHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
@@ -127,6 +122,8 @@
 
   if (response.getInsertNum() == 0) {
     getStorageHandle().insertData(*data);
+   // getStorageHandle().insertEntry(*data);
+   // getStoreIndex().insert(*data);
     response.setInsertNum(1);
   }
 
@@ -200,15 +197,15 @@
 {
   Name insertPrefix;
   insertPrefix.append(prefix).append("insert");
-  getFace().setInterestFilter(insertPrefix,
+  ndn::InterestFilter filter_insert(insertPrefix);
+  getFace().setInterestFilter(filter_insert,
                               bind(&WriteHandle::onInterest, this, _1, _2),
-                              bind(&WriteHandle::onRegisterSuccess, this, _1),
                               bind(&WriteHandle::onRegisterFailed, this, _1, _2));
   Name insertCheckPrefix;
   insertCheckPrefix.append(prefix).append("insert check");
-  getFace().setInterestFilter(insertCheckPrefix,
+  ndn::InterestFilter filter_insertCheck(insertCheckPrefix);
+  getFace().setInterestFilter(filter_insertCheck,
                               bind(&WriteHandle::onCheckInterest, this, _1, _2),
-                              bind(&WriteHandle::onRegisterSuccess, this, _1),
                               bind(&WriteHandle::onRegisterFailed, this, _1, _2));
 }
 
diff --git a/src/handles/write-handle.hpp b/src/handles/write-handle.hpp
index 8638a23..6d42630 100644
--- a/src/handles/write-handle.hpp
+++ b/src/handles/write-handle.hpp
@@ -21,7 +21,9 @@
 #define REPO_HANDLES_WRITE_HANDLE_HPP
 
 #include "base-handle.hpp"
-
+//#include <ndn-cxx/security/signature-sha256.hpp>
+#include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
+#include <ndn-cxx/security/validator-config.hpp>
 #include <queue>
 
 namespace repo {
@@ -67,7 +69,7 @@
 
 
 public:
-  WriteHandle(Face& face, StorageHandle& storageHandle, KeyChain& keyChain,
+  WriteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
               Scheduler& scheduler, ValidatorConfig& validator);
 
   virtual void
@@ -112,9 +114,6 @@
   void
   onValidationFailed(const shared_ptr<const Interest>& interest, const string& reason);
 
-  void
-  onRegisterSuccess(const Name& prefix);
-
   /**
    * @brief insert command prefix register failed
    */
