diff --git a/tools/nfdc.cpp b/tools/nfdc.cpp
index 2f2937f..285bd9d 100644
--- a/tools/nfdc.cpp
+++ b/tools/nfdc.cpp
@@ -20,14 +20,16 @@
   "           Add a nexthop to a FIB entry\n"
   "       remove-nexthop <name> <faceId> \n"
   "           Remove a nexthop from a FIB entry\n"
-  "       set-strategy <name> <stratgy>\n"
-  "           Set a forwarding strategy for a namespace\n"
   "       create <uri> \n"
   "           Create a face in one of the following formats:\n"
   "           UDP unicast:    udp[4|6]://<remote-IP-or-host>[:<remote-port>]\n"
   "           TCP:            tcp[4|6]://<remote-IP-or-host>[:<remote-port>] \n"
   "       destroy <faceId> \n"
   "           Destroy a face\n"
+  "       set-strategy <name> <strategy> \n"
+  "           Set the strategy for a namespace \n"
+  "       unset-strategy <name> \n"
+  "           Unset the strategy for a namespace \n"
   << std::endl;
 }
 
@@ -57,11 +59,6 @@
       return false;
     fibRemoveNextHop(commandOptions);
   }
-  else if (command == "set-strategy") {
-    if (nOptions != 2)
-      return false;
-    fibSetStrategy(commandOptions);
-  }
   else if (command == "create") {
     if (nOptions != 1)
       return false;
@@ -72,6 +69,16 @@
       return false;
     faceDestroy(commandOptions);
   }
+  else if (command == "set-strategy") {
+    if (nOptions != 2)
+      return false;
+    strategyChoiceSet(commandOptions);
+  }
+  else if (command == "unset-strategy") {
+    if (nOptions != 1)
+      return false;
+    strategyChoiceUnset(commandOptions);
+  }
   else
     usage(m_programName);
 
@@ -114,23 +121,6 @@
                   bind(&Controller::onFibSuccess, this, _1, "Nexthop Removal succeeded"),
                   bind(&Controller::onError, this, _1, "Nexthop Removal failed"));
 }
-  
-void
-Controller::fibSetStrategy(const char* commandOptions[])
-{
-  const std::string& name = commandOptions[0];
-  const std::string& strategy = commandOptions[1];
-  ndn::nfd::FibManagementOptions fibOptions;
-  
-  fibOptions.setName(name);
-  fibOptions.setStrategy(strategy);
-  
-  startFibCommand("set-strategy",
-                  fibOptions,
-                  bind(&Controller::onFibSuccess,this, _1, "Successfully set forwarding strategy"),
-                  bind(&Controller::onError,this, _1, "Failed to set forwarding strategy"));
-
-}
 
 namespace {
 bool
@@ -173,17 +163,59 @@
                    bind(&Controller::onFaceSuccess, this, _1, "Face destroy succeeded"),
                    bind(&Controller::onError, this, _1, "Face destroy failed"));
 }
-
+  
+void
+Controller::strategyChoiceSet(const char* commandOptions[])
+{
+  const std::string& name = commandOptions[0];
+  const std::string& strategy = commandOptions[1];
+  ndn::nfd::StrategyChoiceOptions strategyChoiceOptions;
+  
+  strategyChoiceOptions.setName(name);
+  strategyChoiceOptions.setStrategy(strategy);
+  
+  startStrategyChoiceCommand("set",
+                             strategyChoiceOptions,
+                             bind(&Controller::onSetStrategySuccess,
+                                  this,
+                                  _1,
+                                  "Successfully set strategy choice"),
+                             bind(&Controller::onError, this, _1, "Failed to set strategy choice"));
+  
+}
+  
+void
+Controller::strategyChoiceUnset(const char* commandOptions[])
+{
+  const std::string& name = commandOptions[0];
+  ndn::nfd::StrategyChoiceOptions strategyChoiceOptions;
+  
+  strategyChoiceOptions.setName(name);
+  startStrategyChoiceCommand("unset",
+                             strategyChoiceOptions,
+                             bind(&Controller::onSetStrategySuccess,
+                                  this,
+                                  _1,
+                                  "Successfully unset strategy choice"),
+                             bind(&Controller::onError, this, _1, "Failed to unset strategy choice"));
+}
+  
 void
 Controller::onFibSuccess(const ndn::nfd::FibManagementOptions& resp, const std::string& message)
 {
-  std::cout << resp << std::endl;
+  std::cout << message << ": " << resp << std::endl;
 }
   
 void
 Controller::onFaceSuccess(const ndn::nfd::FaceManagementOptions& resp, const std::string& message)
 {
-  std::cout << resp << std::endl;
+  std::cout << message << ": " << resp << std::endl;
+}
+void
+Controller::onSetStrategySuccess(const ndn::nfd::StrategyChoiceOptions& resp,
+                                 const std::string& message)
+{
+  std::cout << message << ": " << resp << std::endl;
 }
   
 void
@@ -191,7 +223,7 @@
 {
   throw Error(message + ": " + error);
 }
-}// namespace nfdc
+} // namespace nfdc
 
 int
 main(int argc, char** argv)
diff --git a/tools/nfdc.hpp b/tools/nfdc.hpp
index 8786a39..fa131fb 100644
--- a/tools/nfdc.hpp
+++ b/tools/nfdc.hpp
@@ -12,6 +12,7 @@
 #include <ndn-cpp-dev/management/nfd-controller.hpp>
 #include <ndn-cpp-dev/management/nfd-fib-management-options.hpp>
 #include <ndn-cpp-dev/management/nfd-face-management-options.hpp>
+#include <ndn-cpp-dev/management/nfd-strategy-choice-options.hpp>
 #include <vector>
 
 namespace nfdc {
@@ -56,20 +57,7 @@
    * @param cmdOptions          delNext command without leading 'remove-nexthop' component
    */
   void
-  fibRemoveNextHop(const char* cmdOptions[]);
-  /**
-   * \brief Sets a forwarding strategy for a namespace
-   *
-   * This command sets a forwarding strategy for a namespace.
-   *
-   * cmd format:
-   *   name strategy
-   *
-   * @param cmdOptions          setStrategy command without leading 'setStrategy' component
-   */
-  void
-  fibSetStrategy(const char* cmdOptions[]);
-  
+  fibRemoveNextHop(const char* cmdOptions[]);  
   /**
    * \brief create new face
    *
@@ -92,22 +80,49 @@
    */
   void
   faceDestroy(const char* cmdOptions[]);
-
+  /**
+   * \brief Set the strategy for a namespace
+   *
+   *
+   * cmd format:
+   *   name strategy
+   *
+   * @param cmdOptions          Set command without leading 'Unset' component
+   */
+  void
+  strategyChoiceSet(const char* cmdOptions[]);
+  /**
+   * \brief Unset the strategy for a namespace
+   *
+   *
+   * cmd format:
+   *   name strategy
+   *
+   * @param cmdOptions          Unset command without leading 'Unset' component
+   */
+  void
+  strategyChoiceUnset(const char* cmdOptions[]);
+  
 private:
   void
-  onFibSuccess(const ndn::nfd::FibManagementOptions& fibOptions, const std::string& message);
+  onFibSuccess(const ndn::nfd::FibManagementOptions& fibOptions,
+               const std::string& message);
 
   void
-  onFaceSuccess(const ndn::nfd::FaceManagementOptions& faceOptions, const std::string& message);
+  onFaceSuccess(const ndn::nfd::FaceManagementOptions& faceOptions,
+                const std::string& message);
   
   void
+  onSetStrategySuccess(const ndn::nfd::StrategyChoiceOptions& resp,
+                       const std::string& message);
+  void
   onError(const std::string& error, const std::string& message);
   
 public:
   const char* m_programName;
 };
 
-}// namespace nfdc
+} // namespace nfdc
 
 #endif // NFD_TOOLS_NFDC_HPP
 
