diff --git a/ndn-cpp/NDN.cpp b/ndn-cpp/NDN.cpp
index cafa4c6..4f7be39 100644
--- a/ndn-cpp/NDN.cpp
+++ b/ndn-cpp/NDN.cpp
@@ -12,6 +12,16 @@
 
 namespace ndn {
 
+void NDN::expressInterest(const Name &name, const ptr_lib::shared_ptr<Closure> &closure, const Interest *interestTemplate)
+{
+  Interest interest(name);
+  vector<unsigned char> encoding;
+  interest.encode(encoding);  
+
+  transport_->connect((char *)"E.hub.ndn.ucla.edu", 9695);
+  transport_->send(&encoding[0], encoding.size());
+}
+    
 void NDN::onReceivedElement(unsigned char *element, unsigned int elementLength)
 {
   BinaryXMLDecoder decoder(element, elementLength);
@@ -22,7 +32,7 @@
     
     ptr_lib::shared_ptr<Interest> dummyInterest;
     UpcallInfo upcallInfo(this, dummyInterest, 0, contentObject);
-    closure_->upcall(UPCALL_CONTENT, upcallInfo);
+    tempClosure_->upcall(UPCALL_CONTENT, upcallInfo);
   }
 }
 
diff --git a/ndn-cpp/NDN.hpp b/ndn-cpp/NDN.hpp
index 9c8c691..09dfad2 100644
--- a/ndn-cpp/NDN.hpp
+++ b/ndn-cpp/NDN.hpp
@@ -7,21 +7,38 @@
 #define	NDN_NDN_HPP
 
 #include "Closure.hpp"
+#include "Interest.hpp"
+#include "transport/Transport.hpp"
 #include "encoding/BinaryXMLElementReader.hpp"
 
 namespace ndn {
 
 class NDN : public ElementListener {
 public:
-  NDN(Closure *closure)
+  NDN(const ptr_lib::shared_ptr<Transport> &transport, const ptr_lib::shared_ptr<Closure> &tempClosure)
   {
-    closure_ = closure;
+    transport_ = transport;
+    tempClosure_ = tempClosure;
   }
   
+  /**
+   * Encode name as an Interest. If interestTemplate is not 0, use its interest selectors.
+   * Send the interest through the transport, read the entire response and call
+   * closure->upcall(UPCALL_CONTENT (or UPCALL_CONTENT_UNVERIFIED),
+   *                 UpcallInfo(this, interest, 0, contentObject)).
+   * @param name reference to a Name for the interest.  This does not keep a pointer to the Name object.
+   * @param closure a shared_ptr for the Closure.  This uses shared_ptr to take another reference to the object.
+   * @param interestTemplate if not 0, copy interest selectors from the template.   This does not keep a pointer to the Interest object.
+   */
+  void expressInterest(const Name &name, const ptr_lib::shared_ptr<Closure> &closure, const Interest *interestTemplate);
+  
+  Transport &tempGetTransport() { return *transport_; }
+  
   virtual void onReceivedElement(unsigned char *element, unsigned int elementLength);
   
 private:
-  Closure *closure_;
+  ptr_lib::shared_ptr<Transport> transport_;
+  ptr_lib::shared_ptr<Closure> tempClosure_;
 };
 
 }
diff --git a/tests/test-get-async.cpp b/tests/test-get-async.cpp
index 011c28f..8965c54 100644
--- a/tests/test-get-async.cpp
+++ b/tests/test-get-async.cpp
@@ -35,23 +35,14 @@
 int main(int argc, char** argv)
 {
   try {
-    Interest interest;    
-    interest.getName() = Name("/ndn/ucla.edu/apps/ndn-js-test/hello.txt/level2/%FD%05%0B%16%7D%95%0E");
-    vector<unsigned char> encoding;
-    interest.encode(encoding);
-
-    TcpTransport transport;
-    transport.connect((char *)"E.hub.ndn.ucla.edu", 9695);
-    transport.send(&encoding[0], encoding.size());
-
-    MyClosure closure;
-    NDN ndn(&closure);
+    NDN ndn(ptr_lib::make_shared<TcpTransport>(), ptr_lib::make_shared<MyClosure>());
+    ndn.expressInterest(Name("/ndn/ucla.edu/apps/ndn-js-test/hello.txt/level2/%FD%05%0B%16%7D%95%0E"), ptr_lib::make_shared<MyClosure>(), 0);
     
     ndn_BinaryXMLElementReader elementReader;
     ndn_BinaryXMLElementReader_init(&elementReader, (struct ndn_ElementListener *)&ndn);
     
     unsigned char buffer[8000];
-    unsigned int nBytes = transport.receive(buffer, sizeof(buffer));
+    unsigned int nBytes = ndn.tempGetTransport().receive(buffer, sizeof(buffer));
     ndn_BinaryXMLElementReader_onReceivedData(&elementReader, buffer, nBytes);    
   } catch (exception &e) {
     cout << "exception: " << e.what() << endl;
