diff --git a/src/route/npt.cpp b/src/route/npt.cpp
index 665dbb2..e094fe3 100644
--- a/src/route/npt.cpp
+++ b/src/route/npt.cpp
@@ -83,11 +83,11 @@
 void
 Npt::addNpteByDestName(string name, string destRouter, Nlsr& pnlsr)
 {
-  std::pair<RoutingTableEntry&, bool> rteCheck =
+  RoutingTableEntry* rteCheck =
     pnlsr.getRoutingTable().findRoutingTableEntry(destRouter);
-  if (rteCheck.second)
+  if (rteCheck != 0)
   {
-    addNpte(name, rteCheck.first, pnlsr);
+    addNpte(name, *(rteCheck) , pnlsr);
   }
   else
   {
@@ -99,11 +99,11 @@
 void
 Npt::removeNpte(string name, string destRouter, Nlsr& pnlsr)
 {
-  std::pair<RoutingTableEntry&, bool> rteCheck =
+  RoutingTableEntry* rteCheck =
     pnlsr.getRoutingTable().findRoutingTableEntry(destRouter);
-  if (rteCheck.second)
+  if (rteCheck != 0)
   {
-    removeNpte(name, rteCheck.first, pnlsr);
+    removeNpte(name, *(rteCheck), pnlsr);
   }
   else
   {
@@ -122,11 +122,11 @@
     for (std::list<RoutingTableEntry>::iterator rteit = rteList.begin();
          rteit != rteList.end(); ++rteit)
     {
-      std::pair<RoutingTableEntry&, bool> rteCheck =
+      RoutingTableEntry* rteCheck =
         pnlsr.getRoutingTable().findRoutingTableEntry((*rteit).getDestination());
-      if (rteCheck.second)
+      if (rteCheck != 0)
       {
-        addNpte((*it).getNamePrefix(), rteCheck.first, pnlsr);
+        addNpte((*it).getNamePrefix(), *(rteCheck), pnlsr);
       }
       else
       {
diff --git a/src/route/routing-table-calculator.cpp b/src/route/routing-table-calculator.cpp
index 6c6dad3..d63904e 100644
--- a/src/route/routing-table-calculator.cpp
+++ b/src/route/routing-table-calculator.cpp
@@ -448,13 +448,14 @@
   double distance = 0.0;
   string srcRouterKey = pMap.getRouterNameByMappingNo(src) + "/3";
   string destRouterKey = pMap.getRouterNameByMappingNo(dest) + "/3";
-  double srcRadius = (pnlsr.getLsdb().getCorLsa(
-                        srcRouterKey).first).getCorRadius();
-  double srcTheta = (pnlsr.getLsdb().getCorLsa(srcRouterKey).first).getCorTheta();
-  double destRadius = (pnlsr.getLsdb().getCorLsa(
-                         destRouterKey).first).getCorRadius();
-  double destTheta = (pnlsr.getLsdb().getCorLsa(
-                        destRouterKey).first).getCorTheta();
+  double srcRadius = (pnlsr.getLsdb().findCoordinateLsa(
+                        srcRouterKey))->getCorRadius();
+  double srcTheta = (pnlsr.getLsdb().findCoordinateLsa(
+                       srcRouterKey))->getCorTheta();
+  double destRadius = (pnlsr.getLsdb().findCoordinateLsa(
+                         destRouterKey))->getCorRadius();
+  double destTheta = (pnlsr.getLsdb().findCoordinateLsa(
+                        destRouterKey))->getCorTheta();
   double diffTheta = fabs(srcTheta - destTheta);
   if (diffTheta > MATH_PI)
   {
diff --git a/src/route/routing-table.cpp b/src/route/routing-table.cpp
index 9e2c19c..097e95a 100644
--- a/src/route/routing-table.cpp
+++ b/src/route/routing-table.cpp
@@ -140,8 +140,8 @@
 void
 RoutingTable::addNextHop(string destRouter, NextHop& nh)
 {
-  std::pair<RoutingTableEntry&, bool> rte = findRoutingTableEntry(destRouter);
-  if (!rte.second)
+  RoutingTableEntry* rteChk = findRoutingTableEntry(destRouter);
+  if (rteChk == 0)
   {
     RoutingTableEntry rte(destRouter);
     rte.getNhl().addNextHop(nh);
@@ -149,22 +149,21 @@
   }
   else
   {
-    (rte.first).getNhl().addNextHop(nh);
+    rteChk->getNhl().addNextHop(nh);
   }
 }
 
-std::pair<RoutingTableEntry&, bool>
-RoutingTable::findRoutingTableEntry(string destRouter)
+RoutingTableEntry*
+RoutingTable::findRoutingTableEntry(const string destRouter)
 {
   std::list<RoutingTableEntry>::iterator it = std::find_if(m_rTable.begin(),
                                                            m_rTable.end(),
                                                            bind(&routingTableEntryCompare, _1, destRouter));
   if (it != m_rTable.end())
   {
-    return std::make_pair(boost::ref((*it)), true);
+    return &(*it);
   }
-  RoutingTableEntry rteEmpty;
-  return std::make_pair(boost::ref(rteEmpty), false);
+  return 0;
 }
 
 void
diff --git a/src/route/routing-table.hpp b/src/route/routing-table.hpp
index cc04915..8518b12 100644
--- a/src/route/routing-table.hpp
+++ b/src/route/routing-table.hpp
@@ -34,8 +34,8 @@
   void
   printDryRoutingTable();
 
-  std::pair<RoutingTableEntry&, bool>
-  findRoutingTableEntry(std::string destRouter);
+  RoutingTableEntry*
+  findRoutingTableEntry(const std::string destRouter);
 
   void
   scheduleRoutingTableCalculation(Nlsr& pnlsr);
