diff --git a/daemon/face/ndnlp-slicer.cpp b/daemon/face/ndnlp-slicer.cpp
index 6b5b818..285f79f 100644
--- a/daemon/face/ndnlp-slicer.cpp
+++ b/daemon/face/ndnlp-slicer.cpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "ndnlp-slicer.hpp"
 
@@ -40,10 +41,10 @@
 }
 
 template<bool T>
-static inline size_t
-Slicer_encodeFragment(ndn::EncodingImpl<T>& blk,
-                      uint64_t seq, uint16_t fragIndex, uint16_t fragCount,
-                      const uint8_t* payload, size_t payloadSize)
+size_t
+Slicer::encodeFragment(ndn::EncodingImpl<T>& blk,
+                       uint64_t seq, uint16_t fragIndex, uint16_t fragCount,
+                       const uint8_t* payload, size_t payloadSize)
 {
   size_t totalLength = 0;
 
@@ -86,11 +87,15 @@
 void
 Slicer::estimateOverhead()
 {
+  // estimate fragment size with all header fields at largest possible size
   ndn::EncodingEstimator estimator;
-  size_t estimatedSize = Slicer_encodeFragment(estimator,
-                         0, 0, 2, 0, m_mtu);
+  size_t estimatedSize = this->encodeFragment(estimator,
+                                              std::numeric_limits<uint64_t>::max(),
+                                              std::numeric_limits<uint16_t>::max() - 1,
+                                              std::numeric_limits<uint16_t>::max(),
+                                              nullptr, m_mtu);
 
-  size_t overhead = estimatedSize - m_mtu;
+  size_t overhead = estimatedSize - m_mtu; // minus payload length in estimation
   m_maxPayload = m_mtu - overhead;
 }
 
@@ -105,7 +110,7 @@
                          (networkPacketSize / m_maxPayload) +
                          (networkPacketSize % m_maxPayload == 0 ? 0 : 1)
                        );
-  PacketArray pa = make_shared<std::vector<Block> >();
+  PacketArray pa = make_shared<std::vector<Block>>();
   pa->reserve(fragCount);
   SequenceBlock seqBlock = m_seqgen.nextBlock(fragCount);
 
@@ -115,7 +120,7 @@
     size_t payloadSize = std::min(m_maxPayload, networkPacketSize - payloadOffset);
 
     ndn::EncodingBuffer buffer(m_mtu, 0);
-    size_t pktSize = Slicer_encodeFragment(buffer,
+    size_t pktSize = this->encodeFragment(buffer,
       seqBlock[fragIndex], fragIndex, fragCount, payload, payloadSize);
 
     BOOST_VERIFY(pktSize <= m_mtu);
diff --git a/daemon/face/ndnlp-slicer.hpp b/daemon/face/ndnlp-slicer.hpp
index 9442a07..f5d9056 100644
--- a/daemon/face/ndnlp-slicer.hpp
+++ b/daemon/face/ndnlp-slicer.hpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_FACE_NDNLP_SLICER_HPP
 #define NFD_DAEMON_FACE_NDNLP_SLICER_HPP
@@ -31,13 +32,17 @@
 namespace nfd {
 namespace ndnlp {
 
-typedef shared_ptr<std::vector<Block> > PacketArray;
+typedef shared_ptr<std::vector<Block>> PacketArray;
 
 /** \brief provides fragmentation feature at sender
  */
 class Slicer : noncopyable
 {
 public:
+  /** \param mtu maximum size of NDNLP header and payload
+   *  \note If NDNLP packets are to be encapsulated in an additional header
+   *        (eg. in UDP packets), the caller must deduct such overhead.
+   */
   explicit
   Slicer(size_t mtu);
 
@@ -48,6 +53,12 @@
   slice(const Block& block);
 
 private:
+  template<bool T>
+  size_t
+  encodeFragment(ndn::EncodingImpl<T>& blk,
+                 uint64_t seq, uint16_t fragIndex, uint16_t fragCount,
+                 const uint8_t* payload, size_t payloadSize);
+
   /// estimate the size of NDNLP header and maximum payload size per packet
   void
   estimateOverhead();
