diff --git a/helper/ndn_stupidinterestgenerator_helper.cc b/helper/ndn_stupidinterestgenerator_helper.cc
new file mode 100644
index 0000000..982f283
--- /dev/null
+++ b/helper/ndn_stupidinterestgenerator_helper.cc
@@ -0,0 +1,65 @@
+//
+//  ndn_stupidinterestgenerator_helper.cpp
+//  Abstraction
+//
+//  Created by Ilya Moiseenko on 05.08.11.
+//  Copyright 2011 UCLA. All rights reserved.
+//
+
+#include "ndn_stupidinterestgenerator_helper.h"
+#include "ns3/inet-socket-address.h"
+#include "ns3/packet-socket-address.h"
+#include "ns3/string.h"
+#include "ns3/names.h"
+
+
+namespace ns3 {
+    
+    StupidInterestGeneratorHelper::StupidInterestGeneratorHelper (std::string protocol, Address address)
+    {
+        m_factory.SetTypeId ("ns3::StupidInterestGenerator");
+        m_factory.Set ("Protocol", StringValue (protocol));
+        m_factory.Set ("Remote", AddressValue (address));
+    }
+    
+    void 
+    StupidInterestGeneratorHelper::SetAttribute (std::string name, const AttributeValue &value)
+    {
+        m_factory.Set (name, value);
+    }
+    
+    ApplicationContainer
+    StupidInterestGeneratorHelper::Install (Ptr<Node> node) const
+    {
+        return ApplicationContainer (InstallPriv (node));
+    }
+    
+    ApplicationContainer
+    StupidInterestGeneratorHelper::Install (std::string nodeName) const
+    {
+        Ptr<Node> node = Names::Find<Node> (nodeName);
+        return ApplicationContainer (InstallPriv (node));
+    }
+    
+    ApplicationContainer
+    StupidInterestGeneratorHelper::Install (NodeContainer c) const
+    {
+        ApplicationContainer apps;
+        for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
+        {
+            apps.Add (InstallPriv (*i));
+        }
+        
+        return apps;
+    }
+    
+    Ptr<Application>
+    StupidInterestGeneratorHelper::InstallPriv (Ptr<Node> node) const
+    {
+        Ptr<Application> app = m_factory.Create<Application> ();
+        node->AddApplication (app);
+        
+        return app;
+    }
+    
+} // namespace ns3
diff --git a/helper/ndn_stupidinterestgenerator_helper.h b/helper/ndn_stupidinterestgenerator_helper.h
new file mode 100644
index 0000000..4f9f6bb
--- /dev/null
+++ b/helper/ndn_stupidinterestgenerator_helper.h
@@ -0,0 +1,86 @@
+//
+//  ndn_stupidinterestgenerator_helper.h
+//  Abstraction
+//
+//  Created by Ilya Moiseenko on 05.08.11.
+//  Copyright 2011 UCLA. All rights reserved.
+//
+
+#include "ns3/object-factory.h"
+#include "ns3/ipv4-address.h"
+#include "ns3/node-container.h"
+#include "ns3/application-container.h"
+
+namespace ns3 {
+    
+    /**
+     * \brief A helper to make it easier to instantiate an ns3::OnOffApplication 
+     * on a set of nodes.
+     */
+    class StupidInterestGeneratorHelper
+    {
+    public:
+        /**
+         * Create an OnOffHelper to make it easier to work with OnOffApplications
+         *
+         * \param protocol the name of the protocol to use to send traffic
+         *        by the applications. This string identifies the socket
+         *        factory type used to create sockets for the applications.
+         *        A typical value would be ns3::UdpSocketFactory.
+         * \param address the address of the remote node to send traffic
+         *        to.
+         */
+        StupidInterestGeneratorHelper (std::string protocol, Address address);
+        
+        /**
+         * Helper function used to set the underlying application attributes.
+         *
+         * \param name the name of the application attribute to set
+         * \param value the value of the application attribute to set
+         */
+        void SetAttribute (std::string name, const AttributeValue &value);
+        
+        /**
+         * Install an ns3::OnOffApplication on each node of the input container
+         * configured with all the attributes set with SetAttribute.
+         *
+         * \param c NodeContainer of the set of nodes on which an OnOffApplication 
+         * will be installed.
+         * \returns Container of Ptr to the applications installed.
+         */
+        ApplicationContainer Install (NodeContainer c) const;
+        
+        /**
+         * Install an ns3::OnOffApplication on the node configured with all the 
+         * attributes set with SetAttribute.
+         *
+         * \param node The node on which an OnOffApplication will be installed.
+         * \returns Container of Ptr to the applications installed.
+         */
+        ApplicationContainer Install (Ptr<Node> node) const;
+        
+        /**
+         * Install an ns3::OnOffApplication on the node configured with all the 
+         * attributes set with SetAttribute.
+         *
+         * \param nodeName The node on which an OnOffApplication will be installed.
+         * \returns Container of Ptr to the applications installed.
+         */
+        ApplicationContainer Install (std::string nodeName) const;
+        
+    private:
+        /**
+         * \internal
+         * Install an ns3::OnOffApplication on the node configured with all the 
+         * attributes set with SetAttribute.
+         *
+         * \param node The node on which an OnOffApplication will be installed.
+         * \returns Ptr to the application installed.
+         */
+        Ptr<Application> InstallPriv (Ptr<Node> node) const;
+        std::string m_protocol;
+        Address m_remote;
+        ObjectFactory m_factory;
+    };
+    
+} // namespace ns3
