diff --git a/nlsr-sync-0.0/nlsr.c b/nlsr-sync-0.0/nlsr.c
index cbf34b3..578a0a6 100755
--- a/nlsr-sync-0.0/nlsr.c
+++ b/nlsr-sync-0.0/nlsr.c
@@ -193,7 +193,17 @@
 	memcpy(nbr->name,rtr_name,strlen(rtr_name)+1);
 	nbr->length=strlen(rtr_name)+1;
 
-	add_nbr_to_adl(nbr,face_id);
+	//add_nbr_to_adl(nbr,face_id);
+
+	struct name_prefix *nbr_name=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
+	get_host_name_from_command_string(nbr_name,nbr->name,0);
+	printf("Hostname of neighbor: %s ",nbr_name->name);
+
+	struct sockaddr_in *ip=get_ip_from_hostname(nbr_name->name);
+	printf("IP Address: %s \n",inet_ntoa( ip->sin_addr ));
+
+	add_nbr_to_adl(nbr,face_id,inet_ntoa( ip->sin_addr ));
+	
 
 	free(nbr->name);
 	free(nbr);
@@ -509,6 +519,94 @@
 	}
 }
 
+
+void 
+process_command_topo_prefix(char *command)
+{
+	if(command==NULL)
+	{
+		printf(" Wrong Command Format ( topo-prefix )\n");
+		return;
+	}
+	char *rem;
+	const char *sep=" \t\n";
+	char *topo_prefix;
+
+	topo_prefix=strtok_r(command,sep,&rem);
+	if(topo_prefix==NULL)
+	{
+		printf(" Wrong Command Format (  topo-prefix /name/prefix  )\n");
+		return;
+	}
+	else
+	{
+		if( nlsr->topo_prefix != NULL)	
+			free(nlsr->topo_prefix);
+		nlsr->topo_prefix=(char *)malloc(strlen(topo_prefix)+1);
+		memset(nlsr->topo_prefix,strlen(topo_prefix)+1,0);
+		memcpy(nlsr->topo_prefix,topo_prefix,strlen(topo_prefix));
+
+		//printf(" Topo Prefix: %s \n",nlsr->topo_prefix);
+
+	}
+}
+
+
+void 
+process_command_slice_prefix(char *command)
+{
+	if(command==NULL)
+	{
+		printf(" Wrong Command Format ( slice-prefix /name/prefix )\n");
+		return;
+	}
+	char *rem;
+	const char *sep=" \t\n";
+	char *slice_prefix;
+
+	slice_prefix=strtok_r(command,sep,&rem);
+	if(slice_prefix==NULL)
+	{
+		printf(" Wrong Command Format (  slice-prefix /name/prefix  )\n");
+		return;
+	}
+	else
+	{
+		if ( nlsr->slice_prefix != NULL)
+			free(nlsr->slice_prefix);
+		nlsr->slice_prefix=(char *)malloc(strlen(slice_prefix)+1);
+		memset(nlsr->slice_prefix,strlen(slice_prefix)+1,0);
+		memcpy(nlsr->slice_prefix,slice_prefix,strlen(slice_prefix));
+
+		//printf(" Slice Prefix: %s \n",nlsr->slice_prefix);
+	}
+}
+
+void 
+process_command_hyperbolic(char *command)
+{
+	if(command==NULL)
+	{
+		printf(" Wrong Command Format ( hyperbolic on/off )\n");
+		return;
+	}
+	char *rem;
+	const char *sep=" \t\n";
+	char *on_off;
+
+	on_off=strtok_r(command,sep,&rem);
+	if(on_off==NULL)
+	{
+		printf(" Wrong Command Format ( hyperbolic on/off )\n");
+		return;
+	}
+	
+	if ( strcmp(on_off,"ON") == 0 || strcmp(on_off,"on") == 0 )
+	{
+		nlsr->is_hyperbolic_calc=1;
+	}
+}
+
 void 
 process_conf_command(char *command)
 {
@@ -569,6 +667,14 @@
 	{
 			process_command_debug(remainder);
 	}
+	else if(!strcmp(cmd_type,"topo-prefix") )
+	{
+			process_command_topo_prefix(remainder);
+	}
+	else if(!strcmp(cmd_type,"slice-prefix") )
+	{
+			process_command_slice_prefix(remainder);
+	}
 	else 
 	{
 		printf("Wrong configuration Command %s \n",cmd_type);
@@ -703,7 +809,14 @@
 			res=is_neighbor(np->name);
 			if ( res == 0 )
 			{
-				add_nbr_to_adl(np,face_id);
+				struct name_prefix *nbr_name=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
+				get_host_name_from_command_string(nbr_name,np->name,0);
+				printf("Hostname of neighbor: %s ",nbr_name->name);
+
+				struct sockaddr_in *ip=get_ip_from_hostname(nbr_name->name);
+				printf("IP Address: %s \n",inet_ntoa( ip->sin_addr ));
+				
+				add_nbr_to_adl(np,face_id,inet_ntoa( ip->sin_addr ));
 				sprintf(msg,"Neighbor %s has been added to adjacency list.",name);
 			}
 			else
@@ -957,8 +1070,6 @@
 
 	nlsr->api_port=API_PORT;
 
-	//create_sync_slice();
-
 	nlsr->topo_prefix=(char *)malloc(strlen("/ndn/routing/nlsr")+1);
 	memset(nlsr->topo_prefix,strlen("/ndn/routing/nlsr")+1,0);
 	memcpy(nlsr->topo_prefix,"/ndn/routing/nlsr",strlen("/ndn/routing/nlsr"));
@@ -967,6 +1078,8 @@
 	memset(nlsr->slice_prefix,strlen("/ndn/routing/nlsr/LSA")+1,0);
 	memcpy(nlsr->slice_prefix,"/ndn/routing/nlsr/LSA",strlen("/ndn/routing/nlsr/LSA"));
 
+	nlsr->is_hyperbolic_calc=0;
+
 	return 0;
 }
 
@@ -1007,6 +1120,7 @@
 		nlsr->api_port=port;
 
 	readConfigFile(config_file);
+
 	if ( daemon_mode == 1 )
 	{
 		daemonize_nlsr();
