diff --git a/macbook.conf b/macbook.conf
index cba7a1d..f948796 100644
--- a/macbook.conf
+++ b/macbook.conf
@@ -1,7 +1,7 @@
 #----configuration file for macbook----------
 #
 router-name /ndn/memphis.edu/netlab/macbook
-#ccnneighbor /ndn/memphis.edu/cs/maia
+ccnneighbor /ndn/memphis.edu/cs/maia
 #ccnneighbor /ndn/memphis.edu/cs/mira
 #ccnneighbor /ndn/memphis.edu/cs/castor
 ccnneighbor /ndn/memphis.edu/cs/pollux 141.225.11.132
diff --git a/nlsr_adl.c b/nlsr_adl.c
index ad6254d..0c86785 100644
--- a/nlsr_adl.c
+++ b/nlsr_adl.c
@@ -977,3 +977,61 @@
 	return ret;
 }
 
+
+void 
+get_host_name_from_command_string(struct name_prefix *name_part,
+												char *nbr_name_uri, int offset)
+{
+
+	
+	
+	int res,i;
+	int len=0;
+	const unsigned char *comp_ptr1;
+	size_t comp_size;
+
+	struct ccn_charbuf *name=ccn_charbuf_create();
+	name = ccn_charbuf_create();
+    	res = ccn_name_from_uri(name,nbr_name_uri);
+    	if (res < 0) {
+        	fprintf(stderr, "Bad ccn URI: %s\n", nbr_name_uri);
+        	exit(1);
+    	}	
+
+	struct ccn_indexbuf cid={0};
+
+    	struct ccn_indexbuf *components=&cid;
+    	ccn_name_split (name, components);
+
+	for(i=components->n-2;i> (0+offset);i--)
+	{
+		res=ccn_name_comp_get(name->buf, components,i,&comp_ptr1, &comp_size);
+		len+=1;
+		len+=(int)comp_size;	
+	}
+	len++;
+
+	char *neighbor=(char *)malloc(len);
+	memset(neighbor,0,len);
+
+	for(i=components->n-2;i> (0+offset);i--)
+	{
+		res=ccn_name_comp_get(name->buf, components,i,&comp_ptr1, &comp_size);
+		if ( i != components->n-2)
+		memcpy(neighbor+strlen(neighbor),".",1);
+		memcpy(neighbor+strlen(neighbor),(char *)comp_ptr1,
+													strlen((char *)comp_ptr1));
+
+	}
+
+	name_part->name=(char *)malloc(strlen(neighbor)+1);
+	memset(name_part->name,0,strlen(neighbor)+1);
+	memcpy(name_part->name,neighbor,strlen(neighbor)+1);
+	name_part->length=strlen(neighbor)+1;
+
+	// 01/31/2013
+	free(neighbor);
+	ccn_charbuf_destroy(&name);
+}
+
+
diff --git a/nlsr_adl.h b/nlsr_adl.h
index 1eb74d6..884ae22 100644
--- a/nlsr_adl.h
+++ b/nlsr_adl.h
@@ -51,4 +51,6 @@
 int is_neighbor(char *nbr);
 int is_active_neighbor(char *nbr);
 void update_face_to_adl_for_nbr(char *nbr, int face);
+
+void get_host_name_from_command_string(struct name_prefix *name_part,char *nbr_name_uri, int offset);
 #endif
diff --git a/nlsr_sync.c b/nlsr_sync.c
index 789a0c5..86b26bf 100644
--- a/nlsr_sync.c
+++ b/nlsr_sync.c
@@ -93,7 +93,8 @@
 	ccn_name_init(content_name);
 	if (components->n < 2)
 		return 0;
-	res = ccn_name_append_components(content_name, name->buf, components->buf[0], components->buf[components->n - 1]);
+	res = ccn_name_append_components(content_name, name->buf, components->buf[0]
+										, components->buf[components->n - 1]);
 
 	if ( res < 0)
 		return 0;
@@ -116,11 +117,13 @@
 	if ( nlsr->debugging )
 		{
 			printf("Number of components in name = %d \n",res);
-			printf("Number of components in name as indexbuf->n = %d \n",(int)components1->n);
+			printf("Number of components in name as indexbuf->n = %d \n",
+														(int)components1->n);
 		}
 	ccn_name_chop(content_name,components1,-3);
 	if ( nlsr->debugging )
-		printf("Number of components in name as indexbuf->n after chopping= %d \n",(int)components1->n);	
+		printf("Number of components in name as indexbuf->n after chopping= %d \n"
+															,(int)components1->n);	
 
 	//debugging purpose
 	struct ccn_charbuf *temp1=ccn_charbuf_create();
@@ -138,8 +141,10 @@
 }
 
 
+
 void 
-get_name_part(struct name_prefix *name_part,struct ccn_charbuf * interest_ccnb, struct ccn_indexbuf *interest_comps, int offset)
+get_name_part(struct name_prefix *name_part,struct ccn_charbuf * interest_ccnb, 
+							struct ccn_indexbuf *interest_comps, int offset)
 {
 
 	
@@ -163,7 +168,8 @@
 	size_t comp_size;
 	for(i=lsa_position+1+offset;i<interest_comps->n-1;i++)
 	{
-		ccn_name_comp_get(interest_ccnb->buf, interest_comps,i,&comp_ptr1, &comp_size);
+		ccn_name_comp_get(interest_ccnb->buf, interest_comps,i,&comp_ptr1, 
+																	&comp_size);
 		len+=1;
 		len+=(int)comp_size;	
 	}
@@ -174,9 +180,11 @@
 
 	for(i=lsa_position+1+offset; i<interest_comps->n-1;i++)
 	{
-		ccn_name_comp_get(interest_ccnb->buf, interest_comps,i,&comp_ptr1, &comp_size);
+		ccn_name_comp_get(interest_ccnb->buf, interest_comps,i,&comp_ptr1, 
+																	&comp_size);
 		memcpy(neighbor+strlen(neighbor),"/",1);
-		memcpy(neighbor+strlen(neighbor),(char *)comp_ptr1,strlen((char *)comp_ptr1));
+		memcpy(neighbor+strlen(neighbor),(char *)comp_ptr1,
+												strlen((char *)comp_ptr1));
 
 	}
 
@@ -189,59 +197,7 @@
 	free(neighbor);
 }
 
-void 
-get_host_name_from_command_string(struct name_prefix *name_part,char *nbr_name_uri, int offset)
-{
 
-	
-	
-	int res,i;
-	int len=0;
-	const unsigned char *comp_ptr1;
-	size_t comp_size;
-
-	struct ccn_charbuf *name=ccn_charbuf_create();
-	name = ccn_charbuf_create();
-    	res = ccn_name_from_uri(name,nbr_name_uri);
-    	if (res < 0) {
-        	fprintf(stderr, "Bad ccn URI: %s\n", nbr_name_uri);
-        	exit(1);
-    	}	
-
-	struct ccn_indexbuf cid={0};
-
-    	struct ccn_indexbuf *components=&cid;
-    	ccn_name_split (name, components);
-
-	for(i=components->n-2;i> (0+offset);i--)
-	{
-		res=ccn_name_comp_get(name->buf, components,i,&comp_ptr1, &comp_size);
-		len+=1;
-		len+=(int)comp_size;	
-	}
-	len++;
-
-	char *neighbor=(char *)malloc(len);
-	memset(neighbor,0,len);
-
-	for(i=components->n-2;i> (0+offset);i--)
-	{
-		res=ccn_name_comp_get(name->buf, components,i,&comp_ptr1, &comp_size);
-		if ( i != components->n-2)
-		memcpy(neighbor+strlen(neighbor),".",1);
-		memcpy(neighbor+strlen(neighbor),(char *)comp_ptr1,strlen((char *)comp_ptr1));
-
-	}
-
-	name_part->name=(char *)malloc(strlen(neighbor)+1);
-	memset(name_part->name,0,strlen(neighbor)+1);
-	memcpy(name_part->name,neighbor,strlen(neighbor)+1);
-	name_part->length=strlen(neighbor)+1;
-
-	// 01/31/2013
-	free(neighbor);
-	ccn_charbuf_destroy(&name);
-}
 
 
 
@@ -295,7 +251,8 @@
 			int i;
 			for (i = sizeof(buf) - 1; i >= 0; i--, lifetime_l12 >>= 8)
 				buf[i] = lifetime_l12 & 0xff;
-			ccnb_append_tagged_blob(templ, CCN_DTAG_InterestLifetime, buf, sizeof(buf));
+			ccnb_append_tagged_blob(templ, CCN_DTAG_InterestLifetime, buf, 
+																sizeof(buf));
 		}
 		ccn_charbuf_append_closer(templ); /* </Interest> */
 	}
@@ -307,7 +264,8 @@
 			resultbuf->length = 0;
 		}
 	}
-	res = ccn_get(nlsr->ccn, name, templ, timeout_ms, resultbuf, &pcobuf, NULL, get_flags);
+	res = ccn_get(nlsr->ccn, name, templ, timeout_ms, resultbuf, &pcobuf, NULL, 
+																	get_flags);
 	if (res >= 0) {
 		ptr = resultbuf->buf;
 		length = resultbuf->length;
diff --git a/nlsr_sync.h b/nlsr_sync.h
index d2fe9e5..ad6cd8e 100644
--- a/nlsr_sync.h
+++ b/nlsr_sync.h
@@ -4,7 +4,6 @@
 int sync_monitor(char *topo_prefix, char *slice_prefix);
 int write_data_to_repo(char *data,char *name_prefix);
 int create_sync_slice(char *topo_prefix, char *slice_prefix);
-void get_host_name_from_command_string(struct name_prefix *name_part,char *nbr_name_uri, int offset);
 void process_content_from_sync(struct ccn_charbuf *content_name, struct ccn_indexbuf *components);
 
 #endif
