diff --git a/tests/daemon/fw/algorithm.t.cpp b/tests/daemon/fw/algorithm.t.cpp
index 3ec11da..903a4aa 100644
--- a/tests/daemon/fw/algorithm.t.cpp
+++ b/tests/daemon/fw/algorithm.t.cpp
@@ -98,15 +98,15 @@
   auto face1 = make_shared<DummyFace>();
   auto face2 = make_shared<DummyFace>();
 
-  entry.insertOrUpdateInRecord(*face1, 0, *interest);
+  entry.insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face1), false);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face2), true);
 
-  entry.insertOrUpdateInRecord(*face2, 0, *interest);
+  entry.insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face1), true);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face2), true);
 
-  entry.insertOrUpdateOutRecord(*face1, 0, *interest);
+  entry.insertOrUpdateOutRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face1), false);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face2), true);
 }
@@ -126,22 +126,22 @@
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry0, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry1(*interest);
-  entry1.insertOrUpdateInRecord(*face1, 0, *interest);
+  entry1.insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 25559, *face1), DUPLICATE_NONCE_IN_SAME);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 25559, *face2), DUPLICATE_NONCE_IN_OTHER);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 19004, *face1), DUPLICATE_NONCE_NONE);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry2(*interest);
-  entry2.insertOrUpdateOutRecord(*face1, 0, *interest);
+  entry2.insertOrUpdateOutRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 25559, *face1), DUPLICATE_NONCE_OUT_SAME);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 25559, *face2), DUPLICATE_NONCE_OUT_OTHER);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 19004, *face1), DUPLICATE_NONCE_NONE);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry3(*interest);
-  entry3.insertOrUpdateInRecord(*face1, 0, *interest);
-  entry3.insertOrUpdateOutRecord(*face1, 0, *interest);
+  entry3.insertOrUpdateInRecord(*face1, *interest);
+  entry3.insertOrUpdateOutRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry3, 25559, *face1),
                     DUPLICATE_NONCE_IN_SAME | DUPLICATE_NONCE_OUT_SAME);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry3, 25559, *face2),
@@ -150,8 +150,8 @@
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry3, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry4(*interest);
-  entry4.insertOrUpdateInRecord(*face1, 0, *interest);
-  entry4.insertOrUpdateInRecord(*face2, 0, *interest);
+  entry4.insertOrUpdateInRecord(*face1, *interest);
+  entry4.insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry4, 25559, *face1),
                     DUPLICATE_NONCE_IN_SAME | DUPLICATE_NONCE_IN_OTHER);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry4, 25559, *face2),
@@ -160,8 +160,8 @@
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry4, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry5(*interest);
-  entry5.insertOrUpdateOutRecord(*face1, 0, *interest);
-  entry5.insertOrUpdateOutRecord(*face2, 0, *interest);
+  entry5.insertOrUpdateOutRecord(*face1, *interest);
+  entry5.insertOrUpdateOutRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry5, 25559, *face1),
                     DUPLICATE_NONCE_OUT_SAME | DUPLICATE_NONCE_OUT_OTHER);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry5, 25559, *face2),
@@ -181,15 +181,15 @@
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
 
   // Interest-Data
-  entry.insertOrUpdateOutRecord(*face1, 0, *interest);
+  entry.insertOrUpdateOutRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
-  entry.deleteOutRecord(*face1, 0);
+  entry.deleteOutRecord(*face1);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
 
   // Interest-Nack
-  entry.insertOrUpdateOutRecord(*face2, 0, *interest);
+  entry.insertOrUpdateOutRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
-  pit::OutRecordCollection::iterator outR = entry.getOutRecord(*face2, 0);
+  pit::OutRecordCollection::iterator outR = entry.getOutRecord(*face2);
   BOOST_REQUIRE(outR != entry.out_end());
   lp::Nack nack = makeNack(*interest, lp::NackReason::DUPLICATE);
   bool isNackAccepted = outR->setIncomingNack(nack); // Nack arrival
@@ -197,7 +197,7 @@
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
 
   // Interest-timeout
-  entry.insertOrUpdateOutRecord(*face3, 0, *interest);
+  entry.insertOrUpdateOutRecord(*face3, *interest);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
   this->advanceClocks(ndn::DEFAULT_INTEREST_LIFETIME, 2);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
@@ -213,12 +213,12 @@
 
   time::steady_clock::TimePoint before = time::steady_clock::now();
 
-  entry.insertOrUpdateOutRecord(*face1, 0, *interest);
+  entry.insertOrUpdateOutRecord(*face1, *interest);
   this->advanceClocks(1_s);
 
   BOOST_CHECK_EQUAL(getLastOutgoing(entry), before);
 
-  entry.insertOrUpdateOutRecord(*face2, 0, *interest);
+  entry.insertOrUpdateOutRecord(*face2, *interest);
 
   BOOST_CHECK_EQUAL(getLastOutgoing(entry), time::steady_clock::now());
 }
diff --git a/tests/daemon/fw/asf-strategy.t.cpp b/tests/daemon/fw/asf-strategy.t.cpp
index 33eace4..77cb4b6 100644
--- a/tests/daemon/fw/asf-strategy.t.cpp
+++ b/tests/daemon/fw/asf-strategy.t.cpp
@@ -286,7 +286,7 @@
   consumer->getClientFace().expressInterest(*interest, nullptr, nullptr, nullptr);
   this->advanceClocks(time::milliseconds(100));
 
-  pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(linkBC->getFace(nodeB), 0);
+  pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(linkBC->getFace(nodeB));
   BOOST_CHECK(outRecord != pitEntry->out_end());
 
   this->advanceClocks(time::milliseconds(100));
@@ -362,7 +362,7 @@
       // Get pitEntry of node A
       shared_ptr<pit::Entry> pitEntry = topo.getForwarder(nodeA).getPit().find(*interest);
       //get outRecord associated with face towards B
-      pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(linkAB->getFace(nodeA), 0);
+      pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(linkAB->getFace(nodeA));
 
       BOOST_CHECK(outRecord != pitEntry->out_end());
 
@@ -383,13 +383,13 @@
       pitEntry = topo.getForwarder(nodeB).getPit().find(*interest);
 
       // Get outRecord associated with face towards D.
-      outRecord = pitEntry->getOutRecord(linkBD->getFace(nodeB), 0);
+      outRecord = pitEntry->getOutRecord(linkBD->getFace(nodeB));
 
       BOOST_CHECK(outRecord != pitEntry->out_end());
 
       // RTT between B and D
       this->advanceClocks(5_ms, 160_ms);
-      outRecord = pitEntry->getOutRecord(linkBD->getFace(nodeB), 0);
+      outRecord = pitEntry->getOutRecord(linkBD->getFace(nodeB));
 
       BOOST_CHECK_EQUAL(linkBD->getFace(nodeB).getCounters().nInData, i);
 
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index 9614a26..3ab261e 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -89,7 +89,7 @@
 
   // first Interest goes to nexthop with lowest FIB cost,
   // however face1 is downstream so it cannot be used
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest, pitEntry);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.back().outFaceId, face2->getId());
@@ -101,7 +101,7 @@
   time::steady_clock::TimePoint timeSentLast = time::steady_clock::now();
   std::function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
   periodicalRetxFrom4 = [&] {
-    pitEntry->insertOrUpdateInRecord(*face4, 0, *interest);
+    pitEntry->insertOrUpdateInRecord(*face4, *interest);
     strategy.afterReceiveInterest(FaceEndpoint(*face4, 0), *interest, pitEntry);
 
     size_t nSent = strategy.sendInterestHistory.size();
@@ -133,7 +133,7 @@
   strategy.sendInterestHistory.clear();
   for (int i = 0; i < 3; ++i) {
     this->advanceClocks(TICK, BestRouteStrategy2::RETX_SUPPRESSION_MAX * 2);
-    pitEntry->insertOrUpdateInRecord(*face5, 0, *interest);
+    pitEntry->insertOrUpdateInRecord(*face5, *interest);
     strategy.afterReceiveInterest(FaceEndpoint(*face5, 0), *interest, pitEntry);
   }
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 3);
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 9f7d1ce..c2e646e 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -133,12 +133,12 @@
   Pit& pit = forwarder.getPit();
   auto interestA1 = makeInterest("/A", false, nullopt, 8378);
   shared_ptr<pit::Entry> pitA = pit.insert(*interestA1).first;
-  pitA->insertOrUpdateInRecord(*face1, 0, *interestA1);
+  pitA->insertOrUpdateInRecord(*face1, *interestA1);
 
   auto interestA2 = makeInterest("/A", false, nullopt, 1698);
   forwarder.onOutgoingInterest(pitA, FaceEndpoint(*face2, 0), *interestA2);
 
-  pit::OutRecordCollection::iterator outA2 = pitA->getOutRecord(*face2, 0);
+  pit::OutRecordCollection::iterator outA2 = pitA->getOutRecord(*face2);
   BOOST_REQUIRE(outA2 != pitA->out_end());
   BOOST_CHECK_EQUAL(outA2->getLastNonce(), 1698);
 
@@ -305,15 +305,15 @@
   Pit& pit = forwarder.getPit();
   auto interestD = makeInterest("/A/B/C/D");
   shared_ptr<pit::Entry> pitD = pit.insert(*interestD).first;
-  pitD->insertOrUpdateInRecord(*face1, 0, *interestD);
+  pitD->insertOrUpdateInRecord(*face1, *interestD);
   auto interestA = makeInterest("/A", true);
   shared_ptr<pit::Entry> pitA = pit.insert(*interestA).first;
-  pitA->insertOrUpdateInRecord(*face2, 0, *interestA);
-  pitA->insertOrUpdateInRecord(*face3, 0, *interestA);
+  pitA->insertOrUpdateInRecord(*face2, *interestA);
+  pitA->insertOrUpdateInRecord(*face3, *interestA);
   auto interestC = makeInterest("/A/B/C", true);
   shared_ptr<pit::Entry> pitC = pit.insert(*interestC).first;
-  pitC->insertOrUpdateInRecord(*face3, 0, *interestC);
-  pitC->insertOrUpdateInRecord(*face4, 0, *interestC);
+  pitC->insertOrUpdateInRecord(*face3, *interestC);
+  pitC->insertOrUpdateInRecord(*face4, *interestC);
 
   auto dataD = makeData("/A/B/C/D");
   forwarder.onIncomingData(FaceEndpoint(*face3, 0), *dataD);
@@ -346,10 +346,10 @@
   // dispatch to the correct strategy
   auto interest1 = makeInterest("/A/AYJqayrzF", false, nullopt, 562);
   shared_ptr<pit::Entry> pit1 = pit.insert(*interest1).first;
-  pit1->insertOrUpdateOutRecord(*face1, 0, *interest1);
+  pit1->insertOrUpdateOutRecord(*face1, *interest1);
   auto interest2 = makeInterest("/B/EVyP73ru", false, nullopt, 221);
   shared_ptr<pit::Entry> pit2 = pit.insert(*interest2).first;
-  pit2->insertOrUpdateOutRecord(*face1, 0, *interest2);
+  pit2->insertOrUpdateOutRecord(*face1, *interest2);
 
   lp::Nack nack1 = makeNack(*interest1, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
@@ -366,7 +366,7 @@
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 1);
 
   // record Nack on PIT out-record
-  pit::OutRecordCollection::iterator outRecord1 = pit1->getOutRecord(*face1, 0);
+  pit::OutRecordCollection::iterator outRecord1 = pit1->getOutRecord(*face1);
   BOOST_REQUIRE(outRecord1 != pit1->out_end());
   BOOST_REQUIRE(outRecord1->getIncomingNack() != nullptr);
   BOOST_CHECK_EQUAL(outRecord1->getIncomingNack()->getReason(), lp::NackReason::CONGESTION);
@@ -382,7 +382,7 @@
   // drop if no out-record
   auto interest4 = makeInterest("/Etab4KpY", false, nullopt, 157);
   shared_ptr<pit::Entry> pit4 = pit.insert(*interest4).first;
-  pit4->insertOrUpdateOutRecord(*face1, 0, *interest4);
+  pit4->insertOrUpdateOutRecord(*face1, *interest4);
 
   lp::Nack nack4a = makeNack(*interest4, lp::NackReason::CONGESTION);
   strategyA.afterReceiveNack_count = 0;
@@ -400,7 +400,7 @@
   BOOST_CHECK_EQUAL(strategyB.afterReceiveNack_count, 0);
 
   // drop if inFace is multi-access
-  pit4->insertOrUpdateOutRecord(*face3, 0, *interest4);
+  pit4->insertOrUpdateOutRecord(*face3, *interest4);
   strategyA.afterReceiveNack_count = 0;
   strategyB.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(FaceEndpoint(*face3, 0), nack4a);
@@ -429,7 +429,7 @@
   // don't send Nack if there's no in-record
   auto interest1 = makeInterest("/fM5IVEtC", false, nullopt, 719);
   shared_ptr<pit::Entry> pit1 = pit.insert(*interest1).first;
-  pit1->insertOrUpdateInRecord(*face1, 0, *interest1);
+  pit1->insertOrUpdateInRecord(*face1, *interest1);
 
   face2->sentNacks.clear();
   forwarder.onOutgoingNack(pit1, FaceEndpoint(*face2, 0), nackHeader);
@@ -438,9 +438,9 @@
   // send Nack with correct Nonce
   auto interest2a = makeInterest("/Vi8tRm9MG3", false, nullopt, 152);
   shared_ptr<pit::Entry> pit2 = pit.insert(*interest2a).first;
-  pit2->insertOrUpdateInRecord(*face1, 0, *interest2a);
+  pit2->insertOrUpdateInRecord(*face1, *interest2a);
   auto interest2b = makeInterest("/Vi8tRm9MG3", false, nullopt, 808);
-  pit2->insertOrUpdateInRecord(*face2, 0, *interest2b);
+  pit2->insertOrUpdateInRecord(*face2, *interest2b);
 
   face1->sentNacks.clear();
   forwarder.onOutgoingNack(pit2, FaceEndpoint(*face1, 0), nackHeader);
@@ -449,7 +449,7 @@
   BOOST_CHECK_EQUAL(face1->sentNacks.back().getInterest().getNonce(), 152);
 
   // erase in-record
-  pit::InRecordCollection::iterator inRecord2a = pit2->getInRecord(*face1, 0);
+  pit::InRecordCollection::iterator inRecord2a = pit2->getInRecord(*face1);
   BOOST_CHECK(inRecord2a == pit2->in_end());
 
   // send Nack with correct Nonce
@@ -460,12 +460,12 @@
   BOOST_CHECK_EQUAL(face2->sentNacks.back().getInterest().getNonce(), 808);
 
   // erase in-record
-  pit::InRecordCollection::iterator inRecord2b = pit2->getInRecord(*face1, 0);
+  pit::InRecordCollection::iterator inRecord2b = pit2->getInRecord(*face1);
   BOOST_CHECK(inRecord2b == pit2->in_end());
 
   // don't send Nack to multi-access face
   auto interest2c = makeInterest("/Vi8tRm9MG3", false, nullopt, 228);
-  pit2->insertOrUpdateInRecord(*face3, 0, *interest2c);
+  pit2->insertOrUpdateInRecord(*face3, *interest2c);
 
   face3->sentNacks.clear();
   forwarder.onOutgoingNack(pit1, FaceEndpoint(*face3, 0), nackHeader);
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index b162926..7db3abd 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -75,7 +75,7 @@
 
   shared_ptr<Interest> interest = makeInterest("ndn:/H0D6i5fc");
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*face3, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face3, *interest);
 
   strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest, pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 0);
@@ -100,7 +100,7 @@
   time::steady_clock::TimePoint timeSentLast = time::steady_clock::now();
   std::function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
   periodicalRetxFrom4 = [&] {
-    pitEntry->insertOrUpdateInRecord(*face3, 0, *interest);
+    pitEntry->insertOrUpdateInRecord(*face3, *interest);
     strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest, pitEntry);
 
     size_t nSent = strategy.sendInterestHistory.size();
@@ -127,7 +127,7 @@
 
   shared_ptr<Interest> interest = makeInterest("ndn:/H0D6i5fc");
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
 
   strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest, pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 1);
diff --git a/tests/daemon/fw/ncc-strategy.t.cpp b/tests/daemon/fw/ncc-strategy.t.cpp
index b2f919a..7b03f4f 100644
--- a/tests/daemon/fw/ncc-strategy.t.cpp
+++ b/tests/daemon/fw/ncc-strategy.t.cpp
@@ -70,7 +70,7 @@
   interest1.setInterestLifetime(8_s);
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(interest1).first;
 
-  pitEntry1->insertOrUpdateInRecord(*face3, 0, interest1);
+  pitEntry1->insertOrUpdateInRecord(*face3, interest1);
   strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), interest1, pitEntry1);
 
   // forwards to face1 because routing says it's best
@@ -95,7 +95,7 @@
   interest2.setInterestLifetime(8_s);
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(interest2).first;
 
-  pitEntry2->insertOrUpdateInRecord(*face3, 0, interest2);
+  pitEntry2->insertOrUpdateInRecord(*face3, interest2);
   strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), interest2, pitEntry2);
 
   // forwards to face2 because it responds previously
@@ -127,7 +127,7 @@
   interest1->setInterestLifetime(8_s);
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
 
-  pitEntry1->insertOrUpdateInRecord(*face3, 0, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face3, *interest1);
   strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest1, pitEntry1);
 
   this->advanceClocks(1_ms);
@@ -145,7 +145,7 @@
   interest2->setInterestLifetime(8_s);
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(*interest2).first;
 
-  pitEntry2->insertOrUpdateInRecord(*face3, 0, *interest2);
+  pitEntry2->insertOrUpdateInRecord(*face3, *interest2);
   strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest2, pitEntry2);
 
   // FIB entry is changed before doPropagate executes
@@ -179,7 +179,7 @@
   interest1->setInterestLifetime(2_s);
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
 
-  pitEntry1->insertOrUpdateInRecord(*face3, 0, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face3, *interest1);
   strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest1, pitEntry1);
   limitedIo.run(2 - strategy.sendInterestHistory.size(), 2_s, 10_ms);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 2);
@@ -200,7 +200,7 @@
   interest2->setInterestLifetime(2_s);
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(*interest2).first;
 
-  pitEntry2->insertOrUpdateInRecord(*face3, 0, *interest2);
+  pitEntry2->insertOrUpdateInRecord(*face3, *interest2);
   strategy.afterReceiveInterest(FaceEndpoint(*face3, 0), *interest2, pitEntry2);
   limitedIo.run(3 - strategy.sendInterestHistory.size(), 2_s, 10_ms);
 
@@ -231,7 +231,7 @@
   interest1->setInterestLifetime(2_s);
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
 
-  pitEntry1->insertOrUpdateInRecord(*face1, 0, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face1, *interest1);
   strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest1, pitEntry1);
   limitedIo.run(1 - strategy.sendInterestHistory.size(), 2_s, 10_ms);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 1);
@@ -241,12 +241,12 @@
   shared_ptr<Data> data1 = makeData("ndn:/M4mBXCsd");
   data1->setFreshnessPeriod(5_ms);
   strategy.beforeSatisfyInterest(pitEntry1, FaceEndpoint(*face2, 0), *data1);
-  pitEntry1->deleteOutRecord(*face2, 0);
+  pitEntry1->deleteOutRecord(*face2);
   pitEntry1->clearInRecords();
   this->advanceClocks(10_ms);
 
   // similar Interest: strategy should still forward it
-  pitEntry1->insertOrUpdateInRecord(*face1, 0, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face1, *interest1);
   strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest1, pitEntry1);
   limitedIo.run(2 - strategy.sendInterestHistory.size(), 2_s, 10_ms);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 2);
@@ -273,7 +273,7 @@
   // Interest comes from face1, which is sole downstream
   shared_ptr<Interest> interest1 = makeInterest("ndn:/tFy5HzUzD4");
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
-  pitEntry1->insertOrUpdateInRecord(*face1, 0, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face1, *interest1);
 
   strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest1, pitEntry1);
 
diff --git a/tests/daemon/fw/pit-expiry.t.cpp b/tests/daemon/fw/pit-expiry.t.cpp
index bd705c7..d69448c 100644
--- a/tests/daemon/fw/pit-expiry.t.cpp
+++ b/tests/daemon/fw/pit-expiry.t.cpp
@@ -226,8 +226,8 @@
 
   face1->receiveInterest(*interest, 0);
   auto entry = pit.find(*interest);
-  entry->insertOrUpdateOutRecord(*face2, 0, *interest);
-  entry->insertOrUpdateOutRecord(*face3, 0, *interest);
+  entry->insertOrUpdateOutRecord(*face2, *interest);
+  entry->insertOrUpdateOutRecord(*face3, *interest);
 
   this->advanceClocks(10_ms);
   face2->receiveNack(nack, 0);
@@ -388,8 +388,8 @@
 
   face1->receiveInterest(*interest, 0);
   auto entry = pit.find(*interest);
-  entry->insertOrUpdateOutRecord(*face2, 0, *interest);
-  entry->insertOrUpdateOutRecord(*face3, 0, *interest);
+  entry->insertOrUpdateOutRecord(*face2, *interest);
+  entry->insertOrUpdateOutRecord(*face3, *interest);
 
   //pitEntry is not erased after receiving the first Nack
   this->advanceClocks(10_ms);
diff --git a/tests/daemon/fw/random-strategy.t.cpp b/tests/daemon/fw/random-strategy.t.cpp
index de62113..84347f5 100644
--- a/tests/daemon/fw/random-strategy.t.cpp
+++ b/tests/daemon/fw/random-strategy.t.cpp
@@ -83,7 +83,7 @@
     shared_ptr<Interest> interest = makeInterest("ndn:/BzgFBchqA" + std::to_string(i));
     shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
 
-    pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+    pitEntry->insertOrUpdateInRecord(*face1, *interest);
     strategy.afterReceiveInterest(FaceEndpoint(*face1, 0), *interest, pitEntry);
   }
 
diff --git a/tests/daemon/fw/retx-suppression.t.cpp b/tests/daemon/fw/retx-suppression.t.cpp
index de4c206..07831ae 100644
--- a/tests/daemon/fw/retx-suppression.t.cpp
+++ b/tests/daemon/fw/retx-suppression.t.cpp
@@ -61,31 +61,31 @@
       time::duration_cast<time::nanoseconds>(MIN_RETX_INTERVAL * 0.1);
 
   // @ time 0
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::NEW);
-  pitEntry->insertOrUpdateOutRecord(*face3, 0, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face3, *interest);
 
   this->advanceClocks(RETRANSMISSION_10P, 5); // @ time 0.5 interval
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS);
-  pitEntry->insertOrUpdateInRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS);
 
   this->advanceClocks(RETRANSMISSION_10P, 6); // @ time 1.1 interval
-  pitEntry->insertOrUpdateInRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD);
   // but strategy decides not to forward
 
   this->advanceClocks(RETRANSMISSION_10P, 1); // @ time 1.2 interval
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD);
   // retransmission suppress shall still give clearance for forwarding
-  pitEntry->insertOrUpdateOutRecord(*face3, 0, *interest); // and strategy forwards
+  pitEntry->insertOrUpdateOutRecord(*face3, *interest); // and strategy forwards
 
   this->advanceClocks(RETRANSMISSION_10P, 2); // @ time 1.4 interval
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS);
-  pitEntry->insertOrUpdateInRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS);
 }
 
@@ -104,13 +104,13 @@
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
 
   // @ 0ms
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::NEW);
-  pitEntry->insertOrUpdateOutRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face2, *interest);
   // suppression interval is 10ms, until 10ms
 
   this->advanceClocks(5_ms); // @ 5ms
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS);
   // suppression interval is 10ms, until 10ms
 
@@ -118,42 +118,42 @@
   // note: what happens at *exactly* 10ms does not matter so it's untested,
   // because in reality network timing won't be exact:
   // incoming Interest is processed either before or after 10ms point
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD);
-  pitEntry->insertOrUpdateOutRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face2, *interest);
   // suppression interval is 30ms, until 41ms
 
   this->advanceClocks(25_ms); // @ 36ms
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS);
   // suppression interval is 30ms, until 41ms
 
   this->advanceClocks(6_ms); // @ 42ms
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD);
   // strategy decides not to forward, but suppression interval is increased nevertheless
   // suppression interval is 90ms, until 101ms
 
   this->advanceClocks(58_ms); // @ 100ms
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS);
   // suppression interval is 90ms, until 101ms
 
   this->advanceClocks(3_ms); // @ 103ms
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD);
-  pitEntry->insertOrUpdateOutRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face2, *interest);
   // suppression interval is 100ms, until 203ms
 
   this->advanceClocks(99_ms); // @ 202ms
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS);
   // suppression interval is 100ms, until 203ms
 
   this->advanceClocks(2_ms); // @ 204ms
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD);
-  pitEntry->insertOrUpdateOutRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face2, *interest);
   // suppression interval is 100ms, until 304ms
 }
 
@@ -172,28 +172,28 @@
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
 
   // @ 0ms
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face2) == RetxSuppressionResult::NEW);
 
   // Simluate forwarding an interest to face2
-  pitEntry->insertOrUpdateOutRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face2, *interest);
   this->advanceClocks(5_ms); // @ 5ms
 
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face2) == RetxSuppressionResult::SUPPRESS);
 
   // Return NEW since no outRecord for face1
-  pitEntry->insertOrUpdateInRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face1) == RetxSuppressionResult::NEW);
 
   this->advanceClocks(6_ms); // @ 11ms
 
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face2) == RetxSuppressionResult::FORWARD);
   // Assume interest is sent and increment interval
-  rs.incrementIntervalForOutRecord(*pitEntry->getOutRecord(*face2, 0));
+  rs.incrementIntervalForOutRecord(*pitEntry->getOutRecord(*face2));
 
-  pitEntry->insertOrUpdateInRecord(*face2, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face2) == RetxSuppressionResult::SUPPRESS);
 }
 
diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp
index ee0d15d..bfddf0c 100644
--- a/tests/daemon/fw/strategy-nack-return.t.cpp
+++ b/tests/daemon/fw/strategy-nack-return.t.cpp
@@ -102,12 +102,12 @@
   auto interest1 = makeInterest("/McQYjMbm", false, nullopt, 992);
   auto interest2 = makeInterest("/McQYjMbm", false, nullopt, 114);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest1).first;
-  pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest1);
-  pitEntry->insertOrUpdateInRecord(*this->face2, 0, *interest2);
-  pitEntry->insertOrUpdateOutRecord(*this->face3, 0, *interest1);
+  pitEntry->insertOrUpdateInRecord(*this->face1, *interest1);
+  pitEntry->insertOrUpdateInRecord(*this->face2, *interest2);
+  pitEntry->insertOrUpdateOutRecord(*this->face3, *interest1);
 
   lp::Nack nack3 = makeNack(*interest1, lp::NackReason::CONGESTION);
-  pitEntry->getOutRecord(*this->face3, 0)->setIncomingNack(nack3);
+  pitEntry->getOutRecord(*this->face3)->setIncomingNack(nack3);
 
   auto f = [&] {
     this->strategy.afterReceiveNack(FaceEndpoint(*this->face3, 0), nack3, pitEntry);
@@ -140,18 +140,18 @@
 
   auto interest1 = makeInterest("/aS9FAyUV19", 286);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest1).first;
-  pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest1);
-  pitEntry->insertOrUpdateOutRecord(*this->face3, 0, *interest1);
-  pitEntry->insertOrUpdateOutRecord(*this->face4, 0, *interest1);
+  pitEntry->insertOrUpdateInRecord(*this->face1, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*this->face3, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*this->face4, *interest1);
 
   lp::Nack nack3 = makeNack(*interest1, lp::NackReason::CONGESTION);
-  pitEntry->getOutRecord(*this->face3, 0)->setIncomingNack(nack3);
+  pitEntry->getOutRecord(*this->face3)->setIncomingNack(nack3);
   this->strategy.afterReceiveNack(FaceEndpoint(*this->face3, 0), nack3, pitEntry);
 
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.size(), 0); // don't send Nack until all upstreams have Nacked
 
   lp::Nack nack4 = makeNack(*interest1, lp::NackReason::CONGESTION);
-  pitEntry->getOutRecord(*this->face4, 0)->setIncomingNack(nack4);
+  pitEntry->getOutRecord(*this->face4)->setIncomingNack(nack4);
 
   auto f = [&] {
     this->strategy.afterReceiveNack(FaceEndpoint(*this->face4, 0), nack4, pitEntry);
@@ -176,18 +176,18 @@
 
   auto interest1 = makeInterest("/sIYw0TXWDj", false, 400_ms, 115);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest1).first;
-  pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest1);
-  pitEntry->insertOrUpdateOutRecord(*this->face3, 0, *interest1);
+  pitEntry->insertOrUpdateInRecord(*this->face1, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*this->face3, *interest1);
 
   this->advanceClocks(300_ms);
   auto interest2 = makeInterest("/sIYw0TXWDj", false, nullopt, 223);
-  pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest2);
-  pitEntry->insertOrUpdateOutRecord(*this->face4, 0, *interest2);
+  pitEntry->insertOrUpdateInRecord(*this->face1, *interest2);
+  pitEntry->insertOrUpdateOutRecord(*this->face4, *interest2);
 
   this->advanceClocks(200_ms); // face3 has timed out
 
   lp::Nack nack4 = makeNack(*interest2, lp::NackReason::CONGESTION);
-  pitEntry->getOutRecord(*this->face4, 0)->setIncomingNack(nack4);
+  pitEntry->getOutRecord(*this->face4)->setIncomingNack(nack4);
   this->strategy.afterReceiveNack(FaceEndpoint(*this->face4, 0), nack4, pitEntry);
 
   BOOST_CHECK_EQUAL(this->strategy.sendNackHistory.size(), 0);
@@ -328,18 +328,18 @@
 
   auto interest1 = makeInterest("/F6sEwB24I", false, nullopt, 282);
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest1).first;
-  pitEntry->insertOrUpdateInRecord(*face1, 0, *interest1);
-  pitEntry->insertOrUpdateOutRecord(*face3, 0, *interest1);
-  pitEntry->insertOrUpdateOutRecord(*face4, 0, *interest1);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*face3, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*face4, *interest1);
 
   lp::Nack nack3 = makeNack(*interest1, Combination::getX());
-  pitEntry->getOutRecord(*face3, 0)->setIncomingNack(nack3);
+  pitEntry->getOutRecord(*face3)->setIncomingNack(nack3);
   strategy.afterReceiveNack(FaceEndpoint(*face3, 0), nack3, pitEntry);
 
   BOOST_CHECK_EQUAL(strategy.sendNackHistory.size(), 0);
 
   lp::Nack nack4 = makeNack(*interest1, Combination::getY());
-  pitEntry->getOutRecord(*face4, 0)->setIncomingNack(nack4);
+  pitEntry->getOutRecord(*face4)->setIncomingNack(nack4);
   strategy.afterReceiveNack(FaceEndpoint(*face4, 0), nack4, pitEntry);
 
   BOOST_REQUIRE_EQUAL(strategy.sendNackHistory.size(), 1);
diff --git a/tests/daemon/fw/strategy-no-route.t.cpp b/tests/daemon/fw/strategy-no-route.t.cpp
index 4cc687d..4ebd5cf 100644
--- a/tests/daemon/fw/strategy-no-route.t.cpp
+++ b/tests/daemon/fw/strategy-no-route.t.cpp
@@ -166,7 +166,7 @@
 
   auto interest = makeInterest(scenario.getInterestName());
   auto pitEntry = this->pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*this->face1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*this->face1, *interest);
 
   auto f = [&] {
     this->strategy.afterReceiveInterest(FaceEndpoint(*this->face1, 0), *interest, pitEntry);
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 50f3fde..643e0ee 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -122,7 +122,7 @@
 
   auto interest = makeInterest("/localhost/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*this->localFace3, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->localFace3, 0), *interest, pitEntry); },
@@ -141,7 +141,7 @@
 
   auto interest = makeInterest("/localhost/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*this->localFace3, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->localFace3, 0), *interest, pitEntry); },
@@ -164,7 +164,7 @@
 
   auto interest = makeInterest("/localhost/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*this->localFace3, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->localFace3, 0), *interest, pitEntry); },
@@ -184,7 +184,7 @@
 
   auto interest = makeInterest("/localhop/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->nonLocalFace1, 0), *interest, pitEntry); },
@@ -207,7 +207,7 @@
 
   auto interest = makeInterest("/localhop/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, *interest);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveInterest(FaceEndpoint(*this->nonLocalFace1, 0), *interest, pitEntry); },
@@ -228,9 +228,9 @@
 
   auto interest = makeInterest("/localhost/A/1", false, nullopt, 1460);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*this->localFace3, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*this->localFace3, *interest);
   lp::Nack nack = makeNack(*interest, lp::NackReason::NO_ROUTE);
-  pitEntry->insertOrUpdateOutRecord(*this->localFace4, 0, *interest)->setIncomingNack(nack);
+  pitEntry->insertOrUpdateOutRecord(*this->localFace4, *interest)->setIncomingNack(nack);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveNack(FaceEndpoint(*this->localFace4, 0), nack, pitEntry); },
@@ -253,9 +253,9 @@
 
   auto interest = makeInterest("/localhop/A/1", 1377);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, 0, *interest);
+  pitEntry->insertOrUpdateInRecord(*this->nonLocalFace1, *interest);
   lp::Nack nack = makeNack(*interest, lp::NackReason::NO_ROUTE);
-  pitEntry->insertOrUpdateOutRecord(*this->localFace4, 0, *interest)->setIncomingNack(nack);
+  pitEntry->insertOrUpdateOutRecord(*this->localFace4, *interest)->setIncomingNack(nack);
 
   BOOST_REQUIRE(this->strategy.waitForAction(
     [&] { this->strategy.afterReceiveNack(FaceEndpoint(*this->localFace4, 0), nack, pitEntry); },
diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp
index 3ddf8f6..519e8db 100644
--- a/tests/daemon/fw/strategy-tester.hpp
+++ b/tests/daemon/fw/strategy-tester.hpp
@@ -112,7 +112,7 @@
                const Interest& interest) override
   {
     sendInterestHistory.push_back({pitEntry->getInterest(), egress.face.getId(), interest});
-    pitEntry->insertOrUpdateOutRecord(egress.face, egress.endpoint, interest);
+    pitEntry->insertOrUpdateOutRecord(egress.face, interest);
     afterAction();
   }
 
@@ -128,7 +128,7 @@
            const lp::NackHeader& header) override
   {
     sendNackHistory.push_back({pitEntry->getInterest(), egress.face.getId(), header});
-    pitEntry->deleteInRecord(egress.face, egress.endpoint);
+    pitEntry->deleteInRecord(egress.face);
     afterAction();
   }
 
diff --git a/tests/daemon/table/cleanup.t.cpp b/tests/daemon/table/cleanup.t.cpp
index d23bb9b..ae83f78 100644
--- a/tests/daemon/table/cleanup.t.cpp
+++ b/tests/daemon/table/cleanup.t.cpp
@@ -54,10 +54,10 @@
     shared_ptr<Interest> interest = makeInterest(name);
     shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
     if ((i & 0x01) != 0) {
-      pitEntry->insertOrUpdateInRecord(*face1, 0, *interest);
+      pitEntry->insertOrUpdateInRecord(*face1, *interest);
     }
     if ((i & 0x02) != 0) {
-      pitEntry->insertOrUpdateOutRecord(*face1, 0, *interest);
+      pitEntry->insertOrUpdateOutRecord(*face1, *interest);
     }
   }
   BOOST_CHECK_EQUAL(fib.size(), 300);
@@ -143,22 +143,22 @@
 
   shared_ptr<Interest> interestA = makeInterest("/A");
   shared_ptr<pit::Entry> entryA = pit.insert(*interestA).first;
-  entryA->insertOrUpdateInRecord(*face1, 0, *interestA);
-  entryA->insertOrUpdateInRecord(*face2, 0, *interestA);
-  entryA->insertOrUpdateOutRecord(*face1, 0, *interestA);
-  entryA->insertOrUpdateOutRecord(*face2, 0, *interestA);
+  entryA->insertOrUpdateInRecord(*face1, *interestA);
+  entryA->insertOrUpdateInRecord(*face2, *interestA);
+  entryA->insertOrUpdateOutRecord(*face1, *interestA);
+  entryA->insertOrUpdateOutRecord(*face2, *interestA);
   // {'/A':[1,2]}
 
   shared_ptr<Interest> interestB = makeInterest("/B");
   shared_ptr<pit::Entry> entryB = pit.insert(*interestB).first;
-  entryB->insertOrUpdateInRecord(*face1, 0, *interestB);
-  entryB->insertOrUpdateOutRecord(*face1, 0, *interestB);
+  entryB->insertOrUpdateInRecord(*face1, *interestB);
+  entryB->insertOrUpdateOutRecord(*face1, *interestB);
   // {'/A':[1,2], '/B':[1]}
 
   shared_ptr<Interest> interestC = makeInterest("/C");
   shared_ptr<pit::Entry> entryC = pit.insert(*interestC).first;
-  entryC->insertOrUpdateInRecord(*face2, 0, *interestC);
-  entryC->insertOrUpdateOutRecord(*face2, 0, *interestC);
+  entryC->insertOrUpdateInRecord(*face2, *interestC);
+  entryC->insertOrUpdateOutRecord(*face2, *interestC);
   // {'/A':[1,2], '/B':[1], '/C':[2]}
   BOOST_CHECK_EQUAL(pit.size(), 3);
 
diff --git a/tests/daemon/table/pit-entry.t.cpp b/tests/daemon/table/pit-entry.t.cpp
index 221753b..8bdb5fe 100644
--- a/tests/daemon/table/pit-entry.t.cpp
+++ b/tests/daemon/table/pit-entry.t.cpp
@@ -85,7 +85,7 @@
 
   // insert in-record
   auto before1 = time::steady_clock::now();
-  InRecordCollection::iterator in1 = entry.insertOrUpdateInRecord(*face1, 0, *interest1);
+  InRecordCollection::iterator in1 = entry.insertOrUpdateInRecord(*face1, *interest1);
   auto after1 = time::steady_clock::now();
   const InRecordCollection& inRecords2 = entry.getInRecords();
   BOOST_CHECK_EQUAL(inRecords2.size(), 1);
@@ -96,11 +96,11 @@
   BOOST_CHECK_LE(in1->getLastRenewed(), after1);
   BOOST_CHECK_LE(in1->getExpiry() - in1->getLastRenewed() - interest1->getInterestLifetime(),
                  after1 - before1);
-  BOOST_CHECK(in1 == entry.getInRecord(*face1, 0));
+  BOOST_CHECK(in1 == entry.getInRecord(*face1));
 
   // insert out-record
   auto before2 = time::steady_clock::now();
-  OutRecordCollection::iterator out1 = entry.insertOrUpdateOutRecord(*face1, 0, *interest1);
+  OutRecordCollection::iterator out1 = entry.insertOrUpdateOutRecord(*face1, *interest1);
   auto after2 = time::steady_clock::now();
   const OutRecordCollection& outRecords2 = entry.getOutRecords();
   BOOST_CHECK_EQUAL(outRecords2.size(), 1);
@@ -111,11 +111,11 @@
   BOOST_CHECK_LE(out1->getLastRenewed(), after2);
   BOOST_CHECK_LE(out1->getExpiry() - out1->getLastRenewed() - interest1->getInterestLifetime(),
                  after2 - before2);
-  BOOST_CHECK(out1 == entry.getOutRecord(*face1, 0));
+  BOOST_CHECK(out1 == entry.getOutRecord(*face1));
 
   // update in-record
   auto before3 = time::steady_clock::now();
-  InRecordCollection::iterator in2 = entry.insertOrUpdateInRecord(*face1, 0, *interest2);
+  InRecordCollection::iterator in2 = entry.insertOrUpdateInRecord(*face1, *interest2);
   auto after3 = time::steady_clock::now();
   const InRecordCollection& inRecords3 = entry.getInRecords();
   BOOST_CHECK_EQUAL(inRecords3.size(), 1);
@@ -125,60 +125,45 @@
   BOOST_CHECK_LE(in2->getExpiry() - in2->getLastRenewed() - interest2->getInterestLifetime(),
                  after3 - before3);
 
-  // insert another in-record (different face)
-  InRecordCollection::iterator in3 = entry.insertOrUpdateInRecord(*face2, 0, *interest3);
+  // insert another in-record
+  InRecordCollection::iterator in3 = entry.insertOrUpdateInRecord(*face2, *interest3);
   const InRecordCollection& inRecords4 = entry.getInRecords();
   BOOST_CHECK_EQUAL(inRecords4.size(), 2);
   BOOST_CHECK_EQUAL(&in3->getFace(), face2.get());
-  BOOST_CHECK_EQUAL(in3->getEndpointId(), 0);
-
-  // insert another in-record (different endpoint)
-  InRecordCollection::iterator in4 = entry.insertOrUpdateInRecord(*face1, 42, *interest4);
-  const InRecordCollection& inRecords5 = entry.getInRecords();
-  BOOST_CHECK_EQUAL(inRecords5.size(), 3);
-  BOOST_CHECK_EQUAL(&in4->getFace(), face1.get());
-  BOOST_CHECK_EQUAL(in4->getEndpointId(), 42);
 
   // get in-record
-  InRecordCollection::iterator in5 = entry.getInRecord(*face1, 0);
-  BOOST_REQUIRE(in5 != entry.in_end());
-  BOOST_CHECK_EQUAL(&in5->getFace(), face1.get());
-  BOOST_CHECK_EQUAL(in5->getEndpointId(), 0);
-  InRecordCollection::iterator in6 = entry.getInRecord(*face1, 42);
-  BOOST_REQUIRE(in6 != entry.in_end());
-  BOOST_CHECK_EQUAL(&in6->getFace(), face1.get());
-  BOOST_CHECK_EQUAL(in6->getEndpointId(), 42);
-  BOOST_CHECK(in5 != in6);
+  InRecordCollection::iterator in4 = entry.getInRecord(*face1);
+  BOOST_REQUIRE(in4 != entry.in_end());
+  BOOST_CHECK_EQUAL(&in4->getFace(), face1.get());
 
   // delete in-record
-  entry.deleteInRecord(*face1, 0);
-  BOOST_CHECK_EQUAL(entry.getInRecords().size(), 2);
-  BOOST_CHECK(entry.getInRecord(*face1, 0) == entry.in_end());
-  BOOST_CHECK(entry.getInRecord(*face1, 42) != entry.in_end());
+  entry.deleteInRecord(*face1);
+  BOOST_CHECK_EQUAL(entry.getInRecords().size(), 1);
+  BOOST_CHECK(entry.getInRecord(*face1) == entry.in_end());
 
   // clear in-records
   entry.clearInRecords();
   BOOST_CHECK_EQUAL(entry.getInRecords().size(), 0);
-  BOOST_CHECK(entry.getInRecord(*face1, 0) == entry.in_end());
-  BOOST_CHECK(entry.getInRecord(*face1, 42) == entry.in_end());
+  BOOST_CHECK(entry.getInRecord(*face1) == entry.in_end());
+  BOOST_CHECK(entry.getInRecord(*face2) == entry.in_end());
 
   // insert another out-record
-  OutRecordCollection::iterator out2 = entry.insertOrUpdateOutRecord(*face2, 0, *interest4);
+  OutRecordCollection::iterator out2 = entry.insertOrUpdateOutRecord(*face2, *interest4);
   const OutRecordCollection& outRecords3 = entry.getOutRecords();
   BOOST_CHECK_EQUAL(outRecords3.size(), 2);
   BOOST_CHECK_EQUAL(&out2->getFace(), face2.get());
 
   // get out-record
-  OutRecordCollection::iterator out3 = entry.getOutRecord(*face1, 0);
+  OutRecordCollection::iterator out3 = entry.getOutRecord(*face1);
   BOOST_REQUIRE(out3 != entry.out_end());
   BOOST_CHECK_EQUAL(&out3->getFace(), face1.get());
 
   // delete out-record
-  entry.deleteOutRecord(*face2, 0);
+  entry.deleteOutRecord(*face2);
   const OutRecordCollection& outRecords4 = entry.getOutRecords();
   BOOST_REQUIRE_EQUAL(outRecords4.size(), 1);
   BOOST_CHECK_EQUAL(&outRecords4.begin()->getFace(), face1.get());
-  BOOST_CHECK(entry.getOutRecord(*face2, 0) == entry.out_end());
+  BOOST_CHECK(entry.getOutRecord(*face2) == entry.out_end());
 }
 
 BOOST_AUTO_TEST_CASE(Lifetime)
@@ -187,17 +172,17 @@
   auto face = make_shared<DummyFace>();
   Entry entry(*interest);
 
-  auto inIt = entry.insertOrUpdateInRecord(*face, 0, *interest);
+  auto inIt = entry.insertOrUpdateInRecord(*face, *interest);
   BOOST_CHECK_GT(inIt->getExpiry(), time::steady_clock::now());
 
-  auto outIt = entry.insertOrUpdateOutRecord(*face, 0, *interest);
+  auto outIt = entry.insertOrUpdateOutRecord(*face, *interest);
   BOOST_CHECK_GT(outIt->getExpiry(), time::steady_clock::now());
 }
 
 BOOST_AUTO_TEST_CASE(OutRecordNack)
 {
   auto face1 = make_shared<DummyFace>();
-  OutRecord outR(*face1, 0);
+  OutRecord outR(*face1);
   BOOST_CHECK(outR.getIncomingNack() == nullptr);
 
   auto interest1 = makeInterest("/uWiapGjYL");
