diff --git a/src/interest-table.cpp b/src/interest-table.cpp
index 5b97f0a..efe7fef 100644
--- a/src/interest-table.cpp
+++ b/src/interest-table.cpp
@@ -36,12 +36,12 @@
   clear();
 }
 
-bool
+void
 InterestTable::insert(shared_ptr<const Interest> interest,
                       ndn::ConstBufferPtr digest,
                       bool isKnown/*=false*/)
 {
-  bool doesExist = erase(digest);
+  erase(digest);
 
   UnsatisfiedInterestPtr request =
     make_shared<UnsatisfiedInterest>(interest, digest, isKnown);
@@ -52,29 +52,28 @@
 
   request->expirationEvent =
     m_scheduler.scheduleEvent(entryLifetime,
-                              [=] () { quiteErase(digest); });
+                              [=] () { erase(digest); });
 
   m_table.insert(request);
-
-  return doesExist;
 }
 
 void
-InterestTable::quiteErase(ndn::ConstBufferPtr digest)
-{
-  erase(digest);
-}
-
-bool
 InterestTable::erase(ndn::ConstBufferPtr digest)
 {
   InterestContainer::index<hashed>::type::iterator it = m_table.get<hashed>().find(digest);
   if (it != m_table.get<hashed>().end()) {
     m_scheduler.cancelEvent((*it)->expirationEvent);
     m_table.erase(it);
-    return true;
   }
-  return false;
+}
+
+bool
+InterestTable::has(ndn::ConstBufferPtr digest)
+{
+  if (m_table.get<hashed>().find(digest) != m_table.get<hashed>().end())
+    return true;
+  else
+    return false;
 }
 
 size_t
diff --git a/src/interest-table.hpp b/src/interest-table.hpp
index d85661c..5292a69 100644
--- a/src/interest-table.hpp
+++ b/src/interest-table.hpp
@@ -67,23 +67,19 @@
    * @param interest Interest to insert.
    * @param digest   The value of the last digest component.
    * @param isKnown  false if the digest is an unknown digest.
-   * @return true if the same interest exists in the table before insertion.
    */
-  bool
+  void
   insert(shared_ptr<const Interest> interest,
          ndn::ConstBufferPtr digest,
          bool isKnown = false);
 
-  /**
-   * @brief Delete interest by digest (e.g., when it was satisfied)
-   *
-   * @return true if an interest with the digest exists in the table before deletion
-   */
+  /// @brief check if an interest with the digest exists in the table
   bool
-  erase(ndn::ConstBufferPtr digest);
+  has(ndn::ConstBufferPtr digest);
 
+  /// @brief Delete interest by digest (e.g., when it was satisfied)
   void
-  quiteErase(ndn::ConstBufferPtr digest);
+  erase(ndn::ConstBufferPtr digest);
 
   const_iterator
   begin() const
diff --git a/src/logic.cpp b/src/logic.cpp
index e0c0501..48d6cfb 100644
--- a/src/logic.cpp
+++ b/src/logic.cpp
@@ -436,7 +436,8 @@
   if (!isTimedProcessing) {
     _LOG_DEBUG_ID("Let's wait, just wait for a while");
     // Do not hurry, some incoming SyncReplies may help us to recognize the digest
-    bool doesExist = m_interestTable.insert(interest, digest, true);
+    bool doesExist = m_interestTable.has(digest);
+    m_interestTable.insert(interest, digest, true);
     if (doesExist)
       // Original comment (not sure): somebody else replied, so restart random-game timer
       // YY: Get the same SyncInterest again, refresh the timer
