diff --git a/ndn-cpp/node.cpp b/ndn-cpp/node.cpp
index 802b84a..5bee365 100644
--- a/ndn-cpp/node.cpp
+++ b/ndn-cpp/node.cpp
@@ -58,19 +58,9 @@
     return false;
 }
 
-void Node::expressInterest(const Name &name, const Interest *interestTemplate, const OnData &onData, const OnTimeout &onTimeout)
+void Node::expressInterest(const Interest &interest, const OnData &onData, const OnTimeout &onTimeout)
 {
-  shared_ptr<const Interest> interest;
-  if (interestTemplate)
-    interest.reset(new Interest
-      (name, interestTemplate->getMinSuffixComponents(), interestTemplate->getMaxSuffixComponents(),
-       interestTemplate->getPublisherPublicKeyDigest(), interestTemplate->getExclude(),
-       interestTemplate->getChildSelector(), interestTemplate->getAnswerOriginKind(),
-       interestTemplate->getScope(), interestTemplate->getInterestLifetimeMilliseconds()));
-  else
-    interest.reset(new Interest(name, 4000.0));
-  
-  shared_ptr<PitEntry> pitEntry(new PitEntry(interest, onData, onTimeout));
+  shared_ptr<PitEntry> pitEntry(new PitEntry(shared_ptr<const Interest>(new Interest(interest)), onData, onTimeout));
   pit_.push_back(pitEntry);
   
   shared_ptr<vector<unsigned char> > encoding = pitEntry->getInterest()->wireEncode();  
@@ -82,6 +72,18 @@
   transport_->send(*encoding);
 }
 
+void Node::expressInterest(const Name &name, const Interest *interestTemplate, const OnData &onData, const OnTimeout &onTimeout)
+{
+  if (interestTemplate)
+    expressInterest(Interest
+      (name, interestTemplate->getMinSuffixComponents(), interestTemplate->getMaxSuffixComponents(),
+       interestTemplate->getPublisherPublicKeyDigest(), interestTemplate->getExclude(),
+       interestTemplate->getChildSelector(), interestTemplate->getAnswerOriginKind(),
+       interestTemplate->getScope(), interestTemplate->getInterestLifetimeMilliseconds()), onData, onTimeout);
+  else
+    expressInterest(Interest(name, 4000.0), onData, onTimeout);
+}
+
 void Node::processEvents()
 {
   transport_->processEvents();
