diff --git a/ndns.conf.sample.in b/ndns.conf.sample.in
index b2b968a..bb1cfa8 100644
--- a/ndns.conf.sample.in
+++ b/ndns.conf.sample.in
@@ -19,9 +19,3 @@
              ; omit cert to select the default certificate of above identity
   ; }
 }
-
-hints
-{
-  ; hint /ucla
-  ; hint /att
-}
diff --git a/src/clients/iterative-query-controller.cpp b/src/clients/iterative-query-controller.cpp
index be3f9f8..3c25505 100644
--- a/src/clients/iterative-query-controller.cpp
+++ b/src/clients/iterative-query-controller.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -177,7 +177,7 @@
 {
   Response re;
   Name zone = m_dstLabel.getPrefix(m_nFinishedComps);
-  re.fromData("", zone, data);
+  re.fromData(zone, data);
   return re;
 }
 
diff --git a/src/clients/iterative-query-controller.hpp b/src/clients/iterative-query-controller.hpp
index 714a504..dba1635 100644
--- a/src/clients/iterative-query-controller.hpp
+++ b/src/clients/iterative-query-controller.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
diff --git a/src/clients/query.cpp b/src/clients/query.cpp
index f890ad1..4e7621b 100644
--- a/src/clients/query.cpp
+++ b/src/clients/query.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -27,9 +27,8 @@
 {
 }
 
-Query::Query(const Name& hint, const Name& zone, const name::Component& queryType)
-  : m_hint(hint)
-  , m_zone(zone)
+Query::Query(const Name& zone, const name::Component& queryType)
+  : m_zone(zone)
   , m_queryType(queryType)
   , m_interestLifetime(ndn::DEFAULT_INTEREST_LIFETIME)
 {
@@ -37,21 +36,18 @@
 
 
 bool
-Query::fromInterest(const Name& hint, const Name& zone, const Interest& interest)
+Query::fromInterest(const Name& zone, const Interest& interest)
 {
   label::MatchResult re;
-  if (!matchName(interest, hint, zone, re))
+  if (!matchName(interest, zone, re))
     return false;
 
   m_rrLabel = re.rrLabel;
   m_rrType = re.rrType;
 
-  m_hint = hint;
   m_zone = zone;
 
   size_t len = zone.size();
-  if (!hint.empty())
-    len += hint.size() + 1;
   m_queryType = interest.getName().get(len);
 
   return true;
@@ -60,12 +56,8 @@
 Interest
 Query::toInterest() const
 {
-  // <hint> /xF0. <zone> [<KEY>|<NDNS>|<NDNS-R>] <rrLabel> <rrType>
+  // <zone> [<KEY>|<NDNS>|<NDNS-R>] <rrLabel> <rrType>
   Name name;
-  if (!m_hint.empty()) {
-    name.append(m_hint)
-        .append(ndn::ndns::label::FORWARDING_HINT_LABEL);
-  }
 
   name.append(this->m_zone)
       .append(this->m_queryType)
@@ -79,7 +71,6 @@
 operator<<(std::ostream& os, const Query& query)
 {
   os << "Query: zone=" << query.getZone()
-     << " hint=" << query.getHint()
      << " queryType=" << query.getQueryType()
      << " rrLabel=" << query.getRrLabel()
      << " rrType=" << query.getRrType()
diff --git a/src/clients/query.hpp b/src/clients/query.hpp
index d1bba0b..bf76684 100644
--- a/src/clients/query.hpp
+++ b/src/clients/query.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -33,14 +33,14 @@
  *
  * Query is an Interest whose name follows the format:
  *
- *     <hint> /xF0. <zone> [<KEY>|<NDNS>|<NDNS-R>] <rrLabel> <rrType>
+ *      <zone> [<KEY>|<NDNS>|<NDNS-R>] <rrLabel> <rrType>
  */
 class Query : noncopyable
 {
 public:
   Query();
 
-  Query(const Name& hint, const Name& zone, const name::Component& queryType);
+  Query(const Name& zone, const name::Component& queryType);
 
   /**
    * @brief construct an Interest according to the query abstraction
@@ -51,18 +51,17 @@
   /**
    * @brief extract the query information (rrLabel, rrType) from a Interest
    *
-   * @param hint     Forwarding hint
    * @param zone     NDNS zone
-   * @param interest The Interest to parse; the Interest must have correct hint and zone,
+   * @param interest The Interest to parse; the Interest must have correct zone,
    *                 otherwise it's undefined behavior
    */
   bool
-  fromInterest(const Name& hint, const Name& zone, const Interest& interest);
+  fromInterest(const Name& zone, const Interest& interest);
 
   bool
   operator==(const Query& other) const
   {
-    return (getHint() == other.getHint() && getZone() == other.getZone() &&
+    return (getZone() == other.getZone() &&
       getQueryType() == other.getQueryType() && getRrLabel() == other.getRrLabel() &&
       getRrType() == other.getRrType());
   }
@@ -76,27 +75,6 @@
 public:
 
   /**
-   * @brief get forwarding hint. default empty hint (empty() == True),
-   * hint won't add to the name
-   */
-  const Name&
-  getHint() const
-  {
-    return m_hint;
-  }
-
-  /**
-   * @brief set forwarding hint. default empty hint (empty() == True),
-   * hint won't add to the name
-   */
-  void
-  setHint(const Name& hint)
-  {
-    m_hint = hint;
-  }
-
-
-  /**
    * @brief get name of authoritative zone
    */
   const Name&
@@ -188,7 +166,6 @@
   }
 
 private:
-  Name m_hint;
   Name m_zone;
   name::Component m_queryType;
   Name m_rrLabel;
diff --git a/src/clients/response.cpp b/src/clients/response.cpp
index 3cc719b..fc14346 100644
--- a/src/clients/response.cpp
+++ b/src/clients/response.cpp
@@ -94,10 +94,10 @@
 }
 
 bool
-Response::fromData(const Name& hint, const Name& zone, const Data& data)
+Response::fromData(const Name& zone, const Data& data)
 {
   label::MatchResult re;
-  if (!matchName(data, hint, zone, re))
+  if (!matchName(data, zone, re))
     return false;
 
   m_rrLabel = re.rrLabel;
@@ -106,8 +106,6 @@
 
   m_zone = zone;
   size_t len = zone.size();
-  if (!hint.empty())
-    len += hint.size() + 1;
   m_queryType = data.getName().get(len);
 
   MetaInfo info = data.getMetaInfo();
diff --git a/src/clients/response.hpp b/src/clients/response.hpp
index 63f90e7..c6a2779 100644
--- a/src/clients/response.hpp
+++ b/src/clients/response.hpp
@@ -57,15 +57,14 @@
   /**
    * @brief fill the attributes from Data packet.
    *
-   * @param hint Forwarding hint
    * @param zone NDNS zone name
-   * @param data Data.getName() must the same hint (if has) and zone as its prefix,
+   * @param data Data.getName() must the same zone as its prefix,
    *             otherwise it's undefined behavior
    * @return false if Data.getName() does not follow the structure of NDNS Response without
    *         changing any attributes, otherwise return true and fill the attributes
    */
   bool
-  fromData(const Name& hint, const Name& zone, const Data& data);
+  fromData(const Name& zone, const Data& data);
 
   shared_ptr<Data>
   toData();
diff --git a/src/daemon/name-server.cpp b/src/daemon/name-server.cpp
index 3170f79..15f77c3 100644
--- a/src/daemon/name-server.cpp
+++ b/src/daemon/name-server.cpp
@@ -75,7 +75,7 @@
 NameServer::onInterest(const Name& prefix, const Interest& interest)
 {
   label::MatchResult re;
-  if (!label::matchName(interest, "", m_zone.getName(), re))
+  if (!label::matchName(interest, m_zone.getName(), re))
     return;
 
   if (re.rrType == ndns::label::NDNS_UPDATE_LABEL) {
@@ -158,7 +158,7 @@
 {
   label::MatchResult re;
   try {
-    if (!label::matchName(*data, "", m_zone.getName(), re))
+    if (!label::matchName(*data, m_zone.getName(), re))
       return;
   }
   catch (std::exception& e) {
diff --git a/src/daemon/name-server.hpp b/src/daemon/name-server.hpp
index 09c3101..aa75ade 100644
--- a/src/daemon/name-server.hpp
+++ b/src/daemon/name-server.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -122,8 +122,6 @@
   Zone m_zone;
   DbMgr& m_dbMgr;
 
-  // Name m_hint;
-
   Name m_ndnsPrefix;
   Name m_keyPrefix;
   Name m_certName;
diff --git a/src/mgmt/management-tool.cpp b/src/mgmt/management-tool.cpp
index 9ade73f..6dd2cb9 100644
--- a/src/mgmt/management-tool.cpp
+++ b/src/mgmt/management-tool.cpp
@@ -376,8 +376,7 @@
 
   // create response for the input data
   Response re;
-  Name hint;
-  re.fromData(hint, zoneName, *data);
+  re.fromData(zoneName, *data);
   Name label = re.getRrLabel();
   name::Component type = re.getRrType();
 
@@ -417,8 +416,7 @@
   for (Rrset& rrset : rrsets) {
     Data data(rrset.getData());
     Response re;
-    Name hint;
-    re.fromData(hint, zoneName, data);
+    re.fromData(zoneName, data);
 
     if (rrset.getLabel().toUri().size() > labelWidth)
       labelWidth = rrset.getLabel().toUri().size();
@@ -436,8 +434,7 @@
   for (Rrset& rrset : rrsets) {
     Data data(rrset.getData());
     Response re;
-    Name hint;
-    re.fromData(hint, zoneName, data);
+    re.fromData(zoneName, data);
     int iteration = re.getNdnsType() == NDNS_RAW || re.getNdnsType() == NDNS_AUTH ?
                       1 : re.getRrs().size();
     const std::vector<Block> &rrs = re.getRrs();
diff --git a/src/ndns-label.cpp b/src/ndns-label.cpp
index 1b1cc80..9386452 100644
--- a/src/ndns-label.cpp
+++ b/src/ndns-label.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -28,25 +28,13 @@
 
 inline size_t
 calculateSkip(const Name& name,
-              const Name& hint, const Name& zone)
+              const Name& zone)
 {
   size_t skip = 0;
 
-  if (!hint.empty()) {
-    // These are only asserts. The caller should supply the right parameters
-    skip = hint.size() + 1 + zone.size();
-    BOOST_ASSERT(name.size() > skip);
-
-    BOOST_ASSERT(name.getPrefix(hint.size()) == hint);
-    BOOST_ASSERT(name.get(hint.size()) == FORWARDING_HINT_LABEL);
-    BOOST_ASSERT(name.getSubName(hint.size() + 1, zone.size()) == zone);
-
-  }
-  else {
-    skip = zone.size();
-    BOOST_ASSERT(name.size() > skip);
-    BOOST_ASSERT(name.getPrefix(zone.size()) == zone);
-  }
+  skip = zone.size();
+  BOOST_ASSERT(name.size() > skip);
+  BOOST_ASSERT(name.getPrefix(zone.size()) == zone);
 
   BOOST_ASSERT(name.get(skip) == NDNS_ITERATIVE_QUERY ||
                name.get(skip) == NDNS_CERT_QUERY);
@@ -57,13 +45,13 @@
 
 bool
 matchName(const Interest& interest,
-          const Name& hint, const Name& zone,
+          const Name& zone,
           MatchResult& result)
 {
-  // [hint / FHLabel] / zoneName / <Update>|rrLabel / UPDATE|rrType / [VERSION]
+  //  zoneName / <Update>|rrLabel / UPDATE|rrType / [VERSION]
 
   const Name& name = interest.getName();
-  size_t skip = calculateSkip(name, hint, zone);
+  size_t skip = calculateSkip(name, zone);
 
   if (name.size() - skip < 1)
     return false;
@@ -85,13 +73,13 @@
 
 bool
 matchName(const Data& data,
-          const Name& hint, const Name& zone,
+          const Name& zone,
           MatchResult& result)
 {
-  // [hint / FHLabel] / zoneName / <Update>|rrLabel / UPDATE|rrType
+  // zoneName / <Update>|rrLabel / UPDATE|rrType
 
   const Name& name = data.getName();
-  size_t skip = calculateSkip(name, hint, zone);
+  size_t skip = calculateSkip(name, zone);
 
   if (name.size() - skip < 2)
     return false;
diff --git a/src/ndns-label.hpp b/src/ndns-label.hpp
index 6641eca..63df2ad 100644
--- a/src/ndns-label.hpp
+++ b/src/ndns-label.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -41,7 +41,8 @@
 /**
  * @brief NDNS recursive query type
  */
-const name::Component NDNS_RECURSIVE_QUERY("NDNS-R");
+// it is not supported now
+// const name::Component NDNS_RECURSIVE_QUERY("NDNS-R");
 
 /**
  * @brief NDNS ID-CERT query type
@@ -51,12 +52,6 @@
 /////////////////////////////////////////////
 
 /**
- * @brief label of forwarding hint
- * @todo not support forwarding hint yet, for future use
- */
-const name::Component FORWARDING_HINT_LABEL("\xF0.");
-
-/**
  * @brief label of update message, located at the last component in Interest name
  */
 const name::Component NDNS_UPDATE_LABEL("UPDATE");
@@ -96,8 +91,6 @@
  * @brief match the Interest (NDNS query, NDNS update) name
  *
  * @param[in] interest Interest to parse
- * @param[in] hint Forwarding hint that is part of the Interest
- *            (only the length will be taken into account)
  * @param[in] zone Zone that the Interest is related to
  *            (only the length will be taken into account)
  * @param[out] result The matching result
@@ -105,15 +98,13 @@
  */
 bool
 matchName(const Interest& interest,
-          const Name& hint, const Name& zone,
+          const Name& zone,
           MatchResult& result);
 
 /**
  * @brief match the Data (NDNS query response, NDNS update response) name
  *
  * @param[in] data Data to parse
- * @param[in] hint Forwarding hint that is part of the Data
- *            (only the length will be taken into account)
  * @param[in] zone Zone that the Data is related to
  *            (only the length will be taken into account)
  * @param[out] result The matching result
@@ -121,7 +112,7 @@
  */
 bool
 matchName(const Data& data,
-          const Name& hint, const Name& zone,
+          const Name& zone,
           MatchResult& result);
 
 
diff --git a/tests/unit/clients/iterative-query-controller.cpp b/tests/unit/clients/iterative-query-controller.cpp
index 93bbb4e..16087e5 100644
--- a/tests/unit/clients/iterative-query-controller.cpp
+++ b/tests/unit/clients/iterative-query-controller.cpp
@@ -67,7 +67,6 @@
   ndn::util::DummyClientFace producerFace;
   ndn::util::DummyClientFace consumerFace;
 
-  Name hint;
   Validator validator;
   ndns::NameServer top;
   ndns::NameServer net;
@@ -82,7 +81,6 @@
   using std::string;
   using ndns::NameServer;
 
-  string hint;
   Name name = m_ndnsim.getName();
   Name dstLabel(name.append("www"));
   name::Component rrType("TXT");
diff --git a/tests/unit/clients/query.cpp b/tests/unit/clients/query.cpp
index 40fdfc3..0e4a1e4 100644
--- a/tests/unit/clients/query.cpp
+++ b/tests/unit/clients/query.cpp
@@ -31,13 +31,11 @@
 {
   Name zone("/net");
   name::Component qType = ndns::label::NDNS_ITERATIVE_QUERY;
-  Name hint;
-  ndns::Query q(hint, zone, qType);
+  ndns::Query q(zone, qType);
 
   q.setRrLabel(Name("/ndnsim/www"));
   BOOST_CHECK_EQUAL(q.getRrLabel(), Name("ndnsim/www"));
   BOOST_CHECK_EQUAL(q.getRrLabel(), Name("/ndnsim/www"));
-  BOOST_CHECK_EQUAL(q.getHint(), hint);
   BOOST_CHECK_EQUAL(q.getZone(), zone);
   BOOST_CHECK_EQUAL(q.getQueryType(), qType);
 
@@ -46,23 +44,22 @@
 
   Interest interest = q.toInterest();
 
-  ndns::Query q2(hint, zone, qType);
-  BOOST_CHECK_EQUAL(q2.fromInterest(hint, zone, interest), true);
+  ndns::Query q2(zone, qType);
+  BOOST_CHECK_EQUAL(q2.fromInterest(zone, interest), true);
 
   ndns::Query q3;
-  BOOST_CHECK_EQUAL(q3.fromInterest(hint, zone, interest), true);
+  BOOST_CHECK_EQUAL(q3.fromInterest(zone, interest), true);
 
   BOOST_CHECK_EQUAL(q, q3);
   BOOST_CHECK_EQUAL(q, q2);
 
-  hint = Name("att");
-  ndns::Query q4(hint, zone, qType);
+  ndns::Query q4(zone, qType);
   q4.setRrLabel("/ndnsim/www");
   q4.setRrType(ndns::label::TXT_RR_TYPE);
   interest = q4.toInterest();
   ndns::Query q5;
 
-  BOOST_CHECK_EQUAL(q5.fromInterest(hint, zone, interest), true);
+  BOOST_CHECK_EQUAL(q5.fromInterest(zone, interest), true);
   BOOST_CHECK_EQUAL(q4, q5);
   BOOST_CHECK_NE(q2, q4);
  }
diff --git a/tests/unit/clients/response.cpp b/tests/unit/clients/response.cpp
index 5950063..c575c85 100644
--- a/tests/unit/clients/response.cpp
+++ b/tests/unit/clients/response.cpp
@@ -29,7 +29,6 @@
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
-  Name hint;
   Name zone("/net");
   name::Component qType = ndns::label::NDNS_ITERATIVE_QUERY;
 
@@ -54,7 +53,7 @@
   // m_keyChain.sign(*data);
 
   ndns::Response r2;
-  BOOST_CHECK_EQUAL(r2.fromData(hint, zone, *data), true);
+  BOOST_CHECK_EQUAL(r2.fromData(zone, *data), true);
   BOOST_CHECK_EQUAL(r, r2);
 
   ndns::Response r4(zone, qType);
@@ -76,7 +75,7 @@
 
   ndns::Response r5(zone, qType);
 
-  BOOST_CHECK_EQUAL(r5.fromData(hint, zone, *data), true);
+  BOOST_CHECK_EQUAL(r5.fromData(zone, *data), true);
   BOOST_CHECK_EQUAL(r4, r5);
  }
 
diff --git a/tests/unit/daemon/name-server.cpp b/tests/unit/daemon/name-server.cpp
index 820dbd2..c081103 100644
--- a/tests/unit/daemon/name-server.cpp
+++ b/tests/unit/daemon/name-server.cpp
@@ -53,7 +53,6 @@
 
 public:
   ndn::util::DummyClientFace face;
-  Name hint;
   const Name& zone;
   Validator validator;
   ndns::NameServer server;
@@ -63,7 +62,7 @@
 
 BOOST_AUTO_TEST_CASE(NdnsQuery)
 {
-  Query q(hint, zone, ndns::label::NDNS_ITERATIVE_QUERY);
+  Query q(zone, ndns::label::NDNS_ITERATIVE_QUERY);
   q.setRrLabel(Name("net"));
   q.setRrType(ndns::label::NS_RR_TYPE);
 
@@ -75,7 +74,7 @@
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
 
     Response resp;
-    BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+    BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RESP);
   });
 
@@ -88,7 +87,7 @@
 
 BOOST_AUTO_TEST_CASE(KeyQuery)
 {
-  Query q(hint, zone, ndns::label::NDNS_ITERATIVE_QUERY);
+  Query q(zone, ndns::label::NDNS_ITERATIVE_QUERY);
   q.setQueryType(ndns::label::NDNS_CERT_QUERY);
   q.setRrType(ndns::label::CERT_RR_TYPE);
 
@@ -101,7 +100,7 @@
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
 
     Response resp;
-    BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+    BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_NACK);
   });
 
@@ -115,7 +114,7 @@
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
 
     Response resp;
-    BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+    BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RAW);
   });
 
@@ -133,7 +132,7 @@
     ++nDataBack;
 
     Response resp;
-    BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+    BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RAW);
   });
 
@@ -147,7 +146,7 @@
     ++nDataBack;
 
     Response resp;
-    BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+    BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_NACK);
   });
 
@@ -172,7 +171,7 @@
   shared_ptr<Data> data = re.toData();
   m_keyChain.sign(*data, m_certName);
 
-  Query q(Name(hint), Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
+  Query q(Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
   const Block& block = data->wireEncode();
   Name name;
   name.append(block);
@@ -188,7 +187,7 @@
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
     Response resp;
 
-    BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+    BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RESP); // by default NDNS_RAW is enough
     BOOST_CHECK_GT(resp.getRrs().size(), 0);
     Block block = resp.getRrs()[0];
@@ -224,7 +223,7 @@
   shared_ptr<Data> data = re.toData();
   m_keyChain.sign(*data, m_certName);
 
-  Query q(Name(hint), Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
+  Query q(Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
   const Block& block = data->wireEncode();
   Name name;
   name.append(block);
@@ -240,7 +239,7 @@
     BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
     Response resp;
 
-    BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+    BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
     BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RESP); // by default NDNS_RAW is enough
     BOOST_CHECK_GT(resp.getRrs().size(), 0);
     Block block = resp.getRrs()[0];
@@ -300,7 +299,7 @@
   shared_ptr<Data> data = re.toData();
   m_keyChain.sign(*data, dskCert->getName());
 
-  Query q(Name(hint), Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
+  Query q(Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
   const Block& block = data->wireEncode();
   Name name;
   name.append(block);
@@ -356,7 +355,6 @@
   boost::asio::io_service io;
   ndn::util::DummyClientFace face;
   ndn::util::DummyClientFace validatorFace;
-  Name hint;
   const Name& zone;
   Validator validator;
   ndns::NameServer server;
@@ -403,7 +401,7 @@
   shared_ptr<Data> data = re.toData();
   m_keyChain.sign(*data, dskCert->getName());
 
-  Query q(Name(hint), Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
+  Query q(Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
   const Block& block = data->wireEncode();
   Name name;
   name.append(block);
@@ -428,7 +426,7 @@
       BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
       Response resp;
 
-      BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+      BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
       BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RESP); // by default NDNS_RAW is enough
       BOOST_CHECK_GT(resp.getRrs().size(), 0);
       Block block = resp.getRrs()[0];
diff --git a/tests/unit/mgmt/management-tool.cpp b/tests/unit/mgmt/management-tool.cpp
index b61ac86..5af6c33 100644
--- a/tests/unit/mgmt/management-tool.cpp
+++ b/tests/unit/mgmt/management-tool.cpp
@@ -188,7 +188,7 @@
     Rrset rrset = findRrSet(zone, label, type);
     Data data(rrset.getData());
     Response resp;
-    resp.fromData("", zone.getName(), data);
+    resp.fromData(zone.getName(), data);
     return resp;
   }
 
diff --git a/tests/unit/ndns-label.cpp b/tests/unit/ndns-label.cpp
index 719d786..cfd650c 100644
--- a/tests/unit/ndns-label.cpp
+++ b/tests/unit/ndns-label.cpp
@@ -30,19 +30,18 @@
 BOOST_AUTO_TEST_CASE(MatchInterest)
 {
   using namespace label;
-  Name hint("/att");
   Name zone("/net/ndnsim");
 
-  Interest interest1("/att/%F0./net/ndnsim/NDNS/www/dsk-111/NS");
-  Interest interest2("/att/%F0./net/ndnsim/NDNS/www/dsk-111/NS/%FD%00");
+  Interest interest1("/net/ndnsim/NDNS/www/dsk-111/NS");
+  Interest interest2("/net/ndnsim/NDNS/www/dsk-111/NS/%FD%00");
 
   MatchResult re;
-  BOOST_CHECK_EQUAL(matchName(interest1, hint, zone, re), true);
+  BOOST_CHECK_EQUAL(matchName(interest1, zone, re), true);
   BOOST_CHECK_EQUAL(re.rrLabel, Name("/www/dsk-111"));
   BOOST_CHECK_EQUAL(re.rrType, name::Component("NS"));
   BOOST_CHECK_EQUAL(re.version, name::Component());
 
-  BOOST_CHECK_EQUAL(matchName(interest2, hint, zone, re), true);
+  BOOST_CHECK_EQUAL(matchName(interest2, zone, re), true);
   BOOST_CHECK_EQUAL(re.rrLabel, Name("/www/dsk-111"));
   BOOST_CHECK_EQUAL(re.rrType, name::Component("NS"));
   BOOST_CHECK_EQUAL(re.version, name::Component::fromEscapedString("%FD%00"));
@@ -51,13 +50,12 @@
 BOOST_AUTO_TEST_CASE(MatchData)
 {
   using namespace label;
-  Name hint("/att");
   Name zone("/net/ndnsim");
 
-  Data data1("/att/%F0./net/ndnsim/NDNS/www/dsk-111/NS/%FD%00");
+  Data data1("/net/ndnsim/NDNS/www/dsk-111/NS/%FD%00");
 
   MatchResult re;
-  BOOST_CHECK_EQUAL(matchName(data1, hint, zone, re), true);
+  BOOST_CHECK_EQUAL(matchName(data1, zone, re), true);
   BOOST_CHECK_EQUAL(re.rrLabel, Name("/www/dsk-111"));
   BOOST_CHECK_EQUAL(re.rrType, name::Component("NS"));
   BOOST_REQUIRE_NO_THROW(re.version.toVersion());
diff --git a/tools/ndns-daemon.cpp b/tools/ndns-daemon.cpp
index af68abd..65028ea 100644
--- a/tools/ndns-daemon.cpp
+++ b/tools/ndns-daemon.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -50,8 +50,6 @@
 
       config.addSectionHandler("zones",
                                bind(&NdnsDaemon::processZonesSection, this, _1, _3));
-      config.addSectionHandler("hints",
-                               bind(&NdnsDaemon::processHintsSection, this, _1, _3));
 
       config.parse(configFile, false);
 
@@ -70,13 +68,6 @@
   }
 
   void
-  processHintsSection(const ndn::ndns::ConfigSection& section, const std::string& filename)
-  {
-    // hint is not supported yet
-    ;
-  }
-
-  void
   processZonesSection(const ndn::ndns::ConfigSection& section, const std::string& filename)
   {
     using namespace boost::filesystem;
diff --git a/tools/ndns-dig.cpp b/tools/ndns-dig.cpp
index bbe5ad3..f7f9af0 100644
--- a/tools/ndns-dig.cpp
+++ b/tools/ndns-dig.cpp
@@ -43,11 +43,10 @@
 class NdnsDig
 {
 public:
-  NdnsDig(const Name& hint, const Name& dstLabel,
+  NdnsDig(const Name& dstLabel,
           const name::Component& rrType, bool shouldValidateIntermediate)
     : m_dstLabel(dstLabel)
     , m_rrType(rrType)
-    , m_hint(hint)
     , m_interestLifetime(DEFAULT_INTEREST_LIFETIME)
     , m_validator(m_face)
     , m_shouldValidateIntermediate(shouldValidateIntermediate)
@@ -199,7 +198,6 @@
   Name m_dstLabel;
   name::Component m_rrType;
 
-  Name m_hint;
   Name m_certName;
   time::milliseconds m_interestLifetime;
 
@@ -305,7 +303,7 @@
   }
 
   try {
-    ndn::ndns::NdnsDig dig("", dstLabel, ndn::name::Component(rrType), shouldValidateIntermediate);
+    ndn::ndns::NdnsDig dig(dstLabel, ndn::name::Component(rrType), shouldValidateIntermediate);
     dig.setInterestLifetime(ndn::time::seconds(ttl));
     dig.setDstFile(dstFile);
 
diff --git a/tools/ndns-update.cpp b/tools/ndns-update.cpp
index 0b56c55..9dbbb2c 100644
--- a/tools/ndns-update.cpp
+++ b/tools/ndns-update.cpp
@@ -48,9 +48,8 @@
 class NdnsUpdate : noncopyable
 {
 public:
-  NdnsUpdate(const Name& hint, const Name& zone, const shared_ptr<Data>& update, Face& face)
-    : m_hint(hint)
-    , m_zone(zone)
+  NdnsUpdate(const Name& zone, const shared_ptr<Data>& update, Face& face)
+    : m_zone(zone)
     , m_interestLifetime(DEFAULT_INTEREST_LIFETIME)
     , m_face(face)
     , m_validator(face)
@@ -136,7 +135,7 @@
   Interest
   makeUpdateInterest()
   {
-    Query q(m_hint, m_zone, label::NDNS_ITERATIVE_QUERY);
+    Query q(m_zone, label::NDNS_ITERATIVE_QUERY);
     q.setRrLabel(Name().append(m_update->wireEncode()));
     q.setRrType(label::NDNS_UPDATE_LABEL);
     q.setInterestLifetime(m_interestLifetime);
@@ -183,7 +182,6 @@
   }
 
 private:
-  Name m_hint;
   Name m_zone;
 
   time::milliseconds m_interestLifetime;
@@ -207,7 +205,6 @@
   using namespace ndn;
   using namespace ndn::ndns;
 
-  Name hint;
   Name zone;
   int ttl = 4;
   Name rrLabel;
@@ -227,7 +224,6 @@
 
     po::options_description config("Configuration");
     config.add_options()
-      ("hint,H", po::value<Name>(&hint), "forwarding hint")
       ("ttl,T", po::value<int>(&ttl), "TTL of query. default: 4 sec")
       ("rrtype,t", po::value<string>(&rrType), "set request RR Type. default: TXT")
       ("ndnsType,n", po::value<string>(&ndnsTypeStr), "Set the ndnsType of the resource record. "
@@ -255,7 +251,7 @@
     config_file_options.add(config).add(hidden);
 
     po::options_description visible("Usage: ndns-update zone rrLabel [-t rrType] [-T TTL] "
-                                    "[-H hint] [-n NdnsType] [-c cert] "
+                                    "[-n NdnsType] [-c cert] "
                                     "[-f contentFile]|[-o content]\n"
                                     "Allowed options");
 
@@ -382,7 +378,7 @@
         }
 
         Response re;
-        re.fromData(hint, zone, *update);
+        re.fromData(zone, *update);
 
         if (vm.count("rrlabel") && rrLabel != re.getRrLabel()) {
           std::cerr << "The loaded Data packet is supposed to have rrLabel: " << re.getRrLabel()
@@ -411,7 +407,7 @@
 
   Face face;
   try {
-    NdnsUpdate updater(hint, zone, update, face);
+    NdnsUpdate updater(zone, update, face);
     updater.setInterestLifetime(ndn::time::seconds(ttl));
 
     updater.start();
