diff --git a/nlsr-sync-0.0/nlsr_npt.c b/nlsr-sync-0.0/nlsr_npt.c
index e9d9d73..a050f1c 100755
--- a/nlsr-sync-0.0/nlsr_npt.c
+++ b/nlsr-sync-0.0/nlsr_npt.c
@@ -235,11 +235,6 @@
 			
 			for( j=first_face; j>= last_face; j--)
 			{
-				//printf("Adding face: Name:%s Face: %d\n",nle->name,faces[j]);
-				//printf("Orig Router: %s \n",orig_router);
-				//printf("Name Prefix: %s \n",nle->name);
-				//printf("Is neighbor Orig Router: %d \n",is_neighbor(orig_router));
-				//printf("Is neighbor Name Prefix: %d \n",is_neighbor(nle->name));
 
 				if ( is_neighbor(orig_router) == 0 )
 				{
@@ -247,7 +242,6 @@
 						printf("Adding face: Name:%s Face: %d\n",nle->name,faces[j]);	
 					if ( nlsr->detailed_logging )
 						writeLogg(__FILE__,__FUNCTION__,__LINE__,"Adding face: Name:%s Face: %d\n",nle->name,faces[j]);
-					//printf("Adding face: Name:%s Face: %d\n",nle->name,faces[j]);
 					add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_REG, faces[j]);	
 				}
 				else 
@@ -258,7 +252,6 @@
 							printf("Adding face: Name:%s Face: %d\n",nle->name,faces[j]);	
 						if ( nlsr->detailed_logging )
 							writeLogg(__FILE__,__FUNCTION__,__LINE__,"Adding face: Name:%s Face: %d\n",nle->name,faces[j]);
-						//printf("Adding face: Name:%s Face: %d\n",nle->name,faces[j]);
 						add_delete_ccn_face_by_face_id(nlsr->ccn, (const char *)nle->name, OP_REG, faces[j]);
 					}
 				}
@@ -376,10 +369,6 @@
 				
 			}
 			
-			
-			
-
-			//hashtb_delete(enle); has to delete later
 		}
 
 		hashtb_end(enle);
@@ -431,7 +420,6 @@
 			printf(" Origination Router: %s \n",ne->orig_router);
 		if ( nlsr->detailed_logging )
 			writeLogg(__FILE__,__FUNCTION__,__LINE__," Origination Router: %s \n",ne->orig_router);
-		//ne->next_hop_face == NO_FACE ? printf(" Next Hop Face: NO_NEXT_HOP \n") : printf(" Next Hop Face: %d \n", ne->next_hop_face);
 		
 		int j, nl_element,face_list_element;
 		struct name_list_entry *nle;		
@@ -607,7 +595,6 @@
 			fle=ef->data;
 			fle->next_hop_face=face_id;
 			fle->route_cost=route_cost;
-			//hashtb_delete(ef);
 		}
 		hashtb_end(ef);
 	}
@@ -660,8 +647,7 @@
 			for(j=0;j<face_list_element;j++)
 			{
 				fle=ef->data;
-				if (fle->next_hop_face > 0 )
-					add_face_to_npt_by_face_id(rte->dest_router,fle->next_hop_face,fle->route_cost);
+				add_face_to_npt_by_face_id(rte->dest_router,fle->next_hop_face,fle->route_cost);
 				hashtb_next(ef);	
 			}
 		}
@@ -727,7 +713,9 @@
 	{
  	 	return -1;
 	}
-	
+
+	print_npt();	
+
 	nlsr_lock();
 
 	if ( nlsr->debugging )
diff --git a/nlsr-sync-0.0/nlsr_route.c b/nlsr-sync-0.0/nlsr_route.c
index b963f95..7fa10ea 100755
--- a/nlsr-sync-0.0/nlsr_route.c
+++ b/nlsr-sync-0.0/nlsr_route.c
@@ -80,13 +80,12 @@
 
 		int num_link=get_no_link_from_adj_matrix(adj_matrix, map_element ,source);
 		
-		if ( (num_link == 0) || (nlsr->multi_path_face_num <= 1 ) )
+		if ( (num_link == 0) || (nlsr->multi_path_face_num == 1 ) )
 		{	
 			calculate_path(adj_matrix,parent,dist, map_element, source);		
 			print_all_path_from_source(parent,source);
 			print_all_next_hop(parent,source);		
 			update_routing_table_with_new_route(parent, dist,source);
-			print_routing_table();
 		}
 		else if ( (num_link != 0) && (nlsr->multi_path_face_num > 1 ) )
 		{
@@ -100,18 +99,18 @@
 				print_all_path_from_source(parent,source);
 				print_all_next_hop(parent,source);		
 				update_routing_table_with_new_route(parent, dist,source);
-				print_routing_table();
 			}
 
 			free(links);
 			free(link_costs);
 		}
 
-		update_npt_with_new_route();
-
 		print_routing_table();
 		print_npt();
 
+		//update_npt_with_new_route();
+
+
 		for(i = 0; i < map_element; i++)
 		{
 			free(adj_matrix[i]);
@@ -1136,10 +1135,8 @@
 			if (orig_router != NULL )
 			{
 				int next_hop_router_num=get_next_hop_from_calculation(parent,me->mapping,source);
-				//printf(" Next hop router Num: %d ",next_hop_router_num);
 				if ( next_hop_router_num == NO_NEXT_HOP )
 				{
-					//update_npt_with_new_route(orig_router,NO_FACE);
 					if ( nlsr->debugging )
 						printf ("Orig_router: %s Next Hop Face: %d \n",orig_router,NO_FACE);
 					if ( nlsr->detailed_logging )
@@ -1148,9 +1145,7 @@
 				else 
 				{
 					char *next_hop_router=get_router_from_rev_map(next_hop_router_num);
-					//printf("Next hop router name: %s \n",next_hop_router);
 					int next_hop_face=get_next_hop_face_from_adl(next_hop_router);
-					//update_npt_with_new_route(orig_router,next_hop_face);
 					update_routing_table(orig_router,next_hop_face,dist[me->mapping]);
 					if ( nlsr->debugging )
 						printf ("Orig_router: %s Next Hop Face: %d \n",orig_router,next_hop_face);
