diff --git a/src/nlsr_lsdb.hpp b/src/nlsr_lsdb.hpp
index 6862224..24bfec3 100644
--- a/src/nlsr_lsdb.hpp
+++ b/src/nlsr_lsdb.hpp
@@ -7,83 +7,83 @@
 namespace nlsr
 {
 
-    using namespace std;
+  using namespace std;
 
-    class Nlsr;
+  class Nlsr;
 
-    class Lsdb
+  class Lsdb
+  {
+  public:
+    Lsdb()
+      : lsaRefreshTime(0)
     {
-    public:
-        Lsdb()
-            : lsaRefreshTime(0)
-        {
-        }
+    }
 
 
-        bool doesLsaExist(string key, int lsType);
-        // function related to Name LSDB
-        bool buildAndInstallOwnNameLsa(Nlsr& pnlsr);
-        std::pair<NameLsa&, bool>  getNameLsa(string key);
-        bool installNameLsa(Nlsr& pnlsr, NameLsa &nlsa);
-        bool removeNameLsa(Nlsr& pnlsr, string& key);
-        bool isNameLsaNew(string key, uint64_t seqNo);
-        void printNameLsdb(); //debugging
+    bool doesLsaExist(string key, int lsType);
+    // function related to Name LSDB
+    bool buildAndInstallOwnNameLsa(Nlsr& pnlsr);
+    std::pair<NameLsa&, bool>  getNameLsa(string key);
+    bool installNameLsa(Nlsr& pnlsr, NameLsa &nlsa);
+    bool removeNameLsa(Nlsr& pnlsr, string& key);
+    bool isNameLsaNew(string key, uint64_t seqNo);
+    void printNameLsdb(); //debugging
 
-        //function related to Cor LSDB
-        bool buildAndInstallOwnCorLsa(Nlsr& pnlsr);
-        std::pair<CorLsa&, bool> getCorLsa(string key);
-        bool installCorLsa(Nlsr& pnlsr, CorLsa &clsa);
-        bool removeCorLsa(Nlsr& pnlsr, string& key);
-        bool isCorLsaNew(string key, uint64_t seqNo);
-        void printCorLsdb(); //debugging
+    //function related to Cor LSDB
+    bool buildAndInstallOwnCorLsa(Nlsr& pnlsr);
+    std::pair<CorLsa&, bool> getCorLsa(string key);
+    bool installCorLsa(Nlsr& pnlsr, CorLsa &clsa);
+    bool removeCorLsa(Nlsr& pnlsr, string& key);
+    bool isCorLsaNew(string key, uint64_t seqNo);
+    void printCorLsdb(); //debugging
 
-        //function related to Adj LSDB
-        void scheduledAdjLsaBuild(Nlsr& pnlsr);
-        bool buildAndInstallOwnAdjLsa(Nlsr& pnlsr);
-        bool removeAdjLsa(Nlsr& pnlsr, string& key);
-        bool isAdjLsaNew(string key, uint64_t seqNo);
-        bool installAdjLsa(Nlsr& pnlsr, AdjLsa &alsa);
-        std::pair<AdjLsa& , bool> getAdjLsa(string key);
-        std::list<AdjLsa>& getAdjLsdb();
-        void printAdjLsdb();
+    //function related to Adj LSDB
+    void scheduledAdjLsaBuild(Nlsr& pnlsr);
+    bool buildAndInstallOwnAdjLsa(Nlsr& pnlsr);
+    bool removeAdjLsa(Nlsr& pnlsr, string& key);
+    bool isAdjLsaNew(string key, uint64_t seqNo);
+    bool installAdjLsa(Nlsr& pnlsr, AdjLsa &alsa);
+    std::pair<AdjLsa& , bool> getAdjLsa(string key);
+    std::list<AdjLsa>& getAdjLsdb();
+    void printAdjLsdb();
 
-        //void scheduleRefreshLsdb(Nlsr& pnlsr, int interval);
-        void setLsaRefreshTime(int lrt);
-        void setThisRouterPrefix(string trp);
+    //void scheduleRefreshLsdb(Nlsr& pnlsr, int interval);
+    void setLsaRefreshTime(int lrt);
+    void setThisRouterPrefix(string trp);
 
-    private:
-        bool addNameLsa(NameLsa &nlsa);
-        bool doesNameLsaExist(string key);
+  private:
+    bool addNameLsa(NameLsa &nlsa);
+    bool doesNameLsaExist(string key);
 
 
-        bool addCorLsa(CorLsa& clsa);
-        bool doesCorLsaExist(string key);
+    bool addCorLsa(CorLsa& clsa);
+    bool doesCorLsaExist(string key);
 
-        bool addAdjLsa(AdjLsa &alsa);
-        bool doesAdjLsaExist(string key);
+    bool addAdjLsa(AdjLsa &alsa);
+    bool doesAdjLsaExist(string key);
 
-        ndn::EventId
-        scheduleNameLsaExpiration(Nlsr& pnlsr, string key, int seqNo, int expTime);
-        void exprireOrRefreshNameLsa(Nlsr& pnlsr, string lsaKey, int seqNo);
-        ndn::EventId
-        scheduleAdjLsaExpiration(Nlsr& pnlsr, string key, int seqNo, int expTime);
-        void exprireOrRefreshAdjLsa(Nlsr& pnlsr, string lsaKey, int seqNo);
-        ndn::EventId
-        scheduleCorLsaExpiration(Nlsr& pnlsr, string key, int seqNo, int expTime);
-        void exprireOrRefreshCorLsa(Nlsr& pnlsr, string lsaKey, int seqNo);
+    ndn::EventId
+    scheduleNameLsaExpiration(Nlsr& pnlsr, string key, int seqNo, int expTime);
+    void exprireOrRefreshNameLsa(Nlsr& pnlsr, string lsaKey, int seqNo);
+    ndn::EventId
+    scheduleAdjLsaExpiration(Nlsr& pnlsr, string key, int seqNo, int expTime);
+    void exprireOrRefreshAdjLsa(Nlsr& pnlsr, string lsaKey, int seqNo);
+    ndn::EventId
+    scheduleCorLsaExpiration(Nlsr& pnlsr, string key, int seqNo, int expTime);
+    void exprireOrRefreshCorLsa(Nlsr& pnlsr, string lsaKey, int seqNo);
 
 
-    private:
-        void cancelScheduleLsaExpiringEvent(Nlsr& pnlsr, EventId eid);
+  private:
+    void cancelScheduleLsaExpiringEvent(Nlsr& pnlsr, EventId eid);
 
-        std::list<NameLsa> nameLsdb;
-        std::list<AdjLsa> adjLsdb;
-        std::list<CorLsa> corLsdb;
+    std::list<NameLsa> nameLsdb;
+    std::list<AdjLsa> adjLsdb;
+    std::list<CorLsa> corLsdb;
 
-        int lsaRefreshTime;
-        string thisRouterPrefix;
+    int lsaRefreshTime;
+    string thisRouterPrefix;
 
-    };
+  };
 
 }//namespace nlsr
 
