diff --git a/nlsr-sync-0.0/macbook.conf b/nlsr-sync-0.0/macbook.conf
index 19b6c30..b22c00a 100755
--- a/nlsr-sync-0.0/macbook.conf
+++ b/nlsr-sync-0.0/macbook.conf
@@ -1,10 +1,10 @@
 #----configuration file for macbook----------
 #
 router-name /ndn/memphis.edu/netlab/macbook/
-ccnneighbor /ndn/memphis.edu/dunhall/castor face9
+ccnneighbor /ndn/memphis.edu/netlab/maia face11
 ccnneighbor /ndn/memphis.edu/pollux face38
-ccnname /ndn/memphis.edu/patterson
-ccnname /ndn/memphis.edu/houston/
+ccnname /ndn/memphis.edu/macbook/patterson
+ccnname /ndn/memphis.edu/macbook/houston/
 #------lsdb-synch-interval-----
 lsdb-synch-interval 350
 interest-retry 2 
@@ -12,6 +12,6 @@
 lsa-refresh-time 600
 router-dead-interval 900
 multi-path-face-num 2 
-#debug on
+debug on
 
 logdir /Users/akmhoque/NLSR2.0
diff --git a/nlsr-sync-0.0/nlsr.c b/nlsr-sync-0.0/nlsr.c
index e3b43ae..cbf34b3 100755
--- a/nlsr-sync-0.0/nlsr.c
+++ b/nlsr-sync-0.0/nlsr.c
@@ -1067,8 +1067,8 @@
 	//write_data_to_repo();
 
 	nlsr->sched = ccn_schedule_create(nlsr, &ndn_rtr_ticker);
-	//nlsr->event_send_info_interest = ccn_schedule_event(nlsr->sched, 1, &send_info_interest, NULL, 0);
-	//nlsr->event = ccn_schedule_event(nlsr->sched, 60000000, &refresh_lsdb, NULL, 0);
+	nlsr->event_send_info_interest = ccn_schedule_event(nlsr->sched, 1, &send_info_interest, NULL, 0);
+	nlsr->event = ccn_schedule_event(nlsr->sched, 60000000, &refresh_lsdb, NULL, 0);
 
 	
 	while(1)
diff --git a/nlsr-sync-0.0/nlsr_lsdb.c b/nlsr-sync-0.0/nlsr_lsdb.c
index d6d24ae..5fc8833 100755
--- a/nlsr-sync-0.0/nlsr_lsdb.c
+++ b/nlsr-sync-0.0/nlsr_lsdb.c
@@ -69,9 +69,6 @@
 make_name_lsa_prefix_for_repo(char *key, char *orig_router, int ls_type, long int ls_id,char *orig_time,char *slice_prefix)
 {
 	
-	
-	//printf("Orig Router: %s LS Type: %d LS Id: %ld\n",orig_router,ls_type,ls_id);
-
 	char lst[2];
 	memset(lst,0,2);
 	sprintf(lst,"%d",ls_type);	
@@ -88,7 +85,22 @@
 	memcpy(key+strlen(key),orig_time,strlen(orig_time));
 	memcpy(key+strlen(key),orig_router,strlen(orig_router));
 	
-	//printf("Key: %s\n",key);
+}
+
+void 
+make_adj_lsa_prefix_for_repo(char *key, char *orig_router, int ls_type, char *orig_time,char *slice_prefix)
+{
+	
+	char lst[2];
+	memset(lst,0,2);
+	sprintf(lst,"%d",ls_type);	
+	memcpy(key+strlen(key),slice_prefix,strlen(slice_prefix));
+	memcpy(key+strlen(key),"/",1);
+	memcpy(key+strlen(key),lst,strlen(lst));
+	memcpy(key+strlen(key),"/",1);
+	memcpy(key+strlen(key),orig_time,strlen(orig_time));
+	memcpy(key+strlen(key),orig_router,strlen(orig_router));
+	
 }
 
 void 
@@ -668,6 +680,32 @@
 			build_adj_lsa(adj_lsa);
 			install_adj_lsa(adj_lsa);
 
+			char lst[2];
+			memset(lst,2,0);
+			sprintf(lst,"%d",LS_TYPE_ADJ);			
+
+			char *repo_con_name=(char *)malloc(strlen(nlsr->slice_prefix)+strlen(adj_lsa->header->orig_time)+strlen(adj_lsa->header->orig_router->name) + strlen(lst) + 5);
+			memset(repo_con_name,strlen(nlsr->slice_prefix)+strlen(adj_lsa->header->orig_time)+strlen(adj_lsa->header->orig_router->name) + strlen(lst) + 5,0);	
+			make_adj_lsa_prefix_for_repo(repo_con_name, adj_lsa->header->orig_router->name,LS_TYPE_ADJ,adj_lsa->header->orig_time,nlsr->slice_prefix);
+
+			printf("Adj LSA Repo Key: %s \n",repo_con_name);
+			
+			char *key=(char *)malloc(adj_lsa->header->orig_router->length+2+2);
+			memset(key,0,adj_lsa->header->orig_router->length+2);
+			make_adj_lsa_key(key,adj_lsa);
+
+			struct name_prefix *lsaid=(struct name_prefix *)malloc(sizeof(struct name_prefix));
+			lsaid->name=(char *)malloc(strlen(key)+1);
+			memset(lsaid->name,strlen(key)+1,0);
+			memcpy(lsaid->name,key,strlen(key));
+			lsaid->length=strlen(key)+1;
+
+		
+			//write_adj_lsa_to_repo(repo_key, lsaid);
+			
+			//free(key);
+			//free(repo_con_name);
+
 			free(adj_lsa->header->orig_router->name);
 			free(adj_lsa->header->orig_router);
 			free(adj_lsa->header->orig_time);
@@ -741,11 +779,11 @@
 
 
 
-	if( !nlsr->is_send_lsdb_interest_scheduled )
+	/*if( !nlsr->is_send_lsdb_interest_scheduled )
 	{	
 		nlsr->event_send_lsdb_interest= ccn_schedule_event(nlsr->sched, 1000, &send_lsdb_interest, NULL, 0);
 		nlsr->is_send_lsdb_interest_scheduled=1;
-	}
+	}*/
 
 	nlsr->adj_build_count++;
 
@@ -2022,6 +2060,21 @@
 }
 
 void
+write_adj_lsa_to_repo(char *repo_content_prefix, struct name_prefix *lsa_id)
+{
+	printf("Content Preifx: %s\n",repo_content_prefix);
+
+	
+	struct ccn_charbuf *lsa_data=ccn_charbuf_create();		
+	get_adj_lsa_data(lsa_data,lsa_id);
+	printf("Name LSA Data: %s \n",ccn_charbuf_as_string(lsa_data));	
+
+	write_data_to_repo(ccn_charbuf_as_string(lsa_data), repo_content_prefix);
+
+	ccn_charbuf_destroy(&lsa_data);
+}
+
+void
 write_name_lsa_to_repo(char *repo_content_prefix, struct name_prefix *lsa_id)
 {
 	printf("Content Preifx: %s\n",repo_content_prefix);
diff --git a/nlsr-sync-0.0/nlsr_lsdb.h b/nlsr-sync-0.0/nlsr_lsdb.h
index 4e8a8d1..32972d9 100755
--- a/nlsr-sync-0.0/nlsr_lsdb.h
+++ b/nlsr-sync-0.0/nlsr_lsdb.h
@@ -87,5 +87,6 @@
 void write_name_lsdb_to_repo(char *slice_prefix);
 void write_name_lsa_to_repo(char *repo_content_prefix, struct name_prefix *lsa_id);
 void make_name_lsa_prefix_for_repo(char *key, char *orig_router, int ls_type, long int ls_id,char *orig_time,char *slice_prefix);
+void write_adj_lsa_to_repo(char *repo_content_prefix, struct name_prefix *lsa_id);
 
 #endif
diff --git a/nlsr-sync-0.0/nlsr_ndn.c b/nlsr-sync-0.0/nlsr_ndn.c
index 9af0a05..5e5c082 100755
--- a/nlsr-sync-0.0/nlsr_ndn.c
+++ b/nlsr-sync-0.0/nlsr_ndn.c
@@ -731,14 +731,14 @@
 	{
 		process_incoming_content_info(selfp,info);
 	}
-	if(!strcmp((char *)comp_ptr1,"lsdb"))
+	/*if(!strcmp((char *)comp_ptr1,"lsdb"))
 	{
 		process_incoming_content_lsdb(selfp,info);
 	}
 	if(!strcmp((char *)comp_ptr1,"lsa"))
 	{
 		process_incoming_content_lsa(selfp,info);
-	}
+	}*/
 
 }
 
diff --git a/nlsr-sync-0.0/nlsr_sync.c b/nlsr-sync-0.0/nlsr_sync.c
index 3839f67..e89fcb8 100644
--- a/nlsr-sync-0.0/nlsr_sync.c
+++ b/nlsr-sync-0.0/nlsr_sync.c
@@ -28,6 +28,7 @@
 #include "nlsr.h"
 #include "nlsr_sync.h"
 #include "nlsr_lsdb.h"
+#include "utility.h"
 
 int 
 get_lsa_position(struct ccn_charbuf * ccnb, struct ccn_indexbuf *comps)
@@ -173,6 +174,101 @@
 	return (char *)ptr;
 }
 
+void 
+process_incoming_sync_content_lsa(char *content_data)
+{
+
+
+	if ( nlsr->debugging )
+		printf("process_incoming_sync_content_lsa called \n");
+	//if ( nlsr->detailed_logging )
+		//writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_content_lsa called \n");	
+
+	char *sep="|";
+	char *rem;
+	char *orig_router;
+	char *orl;
+	int orig_router_length;
+	char *lst;
+	int ls_type;
+	char *lsid;
+	long int ls_id;
+	char *isvld;
+	int isValid;
+	char *num_link;
+	int no_link;
+	char *np;
+	char *np_length;
+	int name_length;
+	char *data;
+	char *orig_time;
+
+	
+	if ( nlsr->debugging )
+		printf("LSA Data \n");
+	//if ( nlsr->detailed_logging )
+	//	writeLogg(__FILE__,__FUNCTION__,__LINE__,"LSA Data\n");	
+
+	if( strlen(content_data ) > 0 )
+	{
+
+		orig_router=strtok_r((char *)content_data,sep,&rem);
+		orl=strtok_r(NULL,sep,&rem);
+		orig_router_length=atoi(orl);
+
+		if ( nlsr->debugging )
+		{
+			printf("	Orig Router Name  : %s\n",orig_router);
+			printf("	Orig Router Length: %d\n",orig_router_length);
+		}
+
+		lst=strtok_r(NULL,sep,&rem);		
+		ls_type=atoi(lst);
+
+		if ( nlsr->debugging )
+			printf("	LS Type  : %d\n",ls_type);
+
+		if ( ls_type == LS_TYPE_NAME )
+		{
+			lsid=strtok_r(NULL,sep,&rem);
+			ls_id=atoi(lsid);
+			orig_time=strtok_r(NULL,sep,&rem);
+			isvld=strtok_r(NULL,sep,&rem);
+			isValid=atoi(isvld);
+			np=strtok_r(NULL,sep,&rem);
+			np_length=strtok_r(NULL,sep,&rem);
+			name_length=atoi(np_length);
+			if ( nlsr->debugging )
+			{
+				printf("	LS ID  : %ld\n",ls_id);
+				printf("	isValid  : %d\n",isValid);
+				printf("	Name Prefix : %s\n",np);
+				printf("	Orig Time   : %s\n",orig_time);
+				printf("	Name Prefix length: %d\n",name_length);
+			}
+
+			build_and_install_others_name_lsa(orig_router,ls_type,ls_id,orig_time,isValid,np);
+
+			print_name_lsdb();
+
+		}
+		else if ( ls_type == LS_TYPE_ADJ )
+		{
+			orig_time=strtok_r(NULL,sep,&rem);
+			num_link=strtok_r(NULL,sep,&rem);
+			no_link=atoi(num_link);
+			data=rem;
+
+			if ( nlsr->debugging )
+			{
+				printf("	No Link  : %d\n",no_link);
+				printf("	Data  : %s\n",data);
+			}
+			build_and_install_others_adj_lsa(orig_router,ls_type,orig_time,no_link,data);
+		}
+	}
+}
+
 void
 process_content_from_sync(struct ccn_charbuf *content_name, struct ccn_indexbuf *components)
 {
@@ -186,6 +282,10 @@
 	int ls_type;
 	long int ls_id=0;
 
+	char *time_stamp=(char *)malloc(20);
+	memset(time_stamp,0,20);
+	get_current_timestamp_micro(time_stamp);
+
 	struct ccn_charbuf *uri = ccn_charbuf_create();
 	ccn_uri_append(uri, content_name->buf, content_name->length, 0);	
 
@@ -195,28 +295,40 @@
 
 	res=ccn_name_comp_get(content_name->buf, components,lsa_position+1,&lst, &comp_size);
 	
-	printf("Ls Type: %s\n",lst);
+	//printf("Ls Type: %s\n",lst);
 	ls_type=atoi((char *)lst);
 	if(ls_type == LS_TYPE_NAME)
 	{
+		
 		res=ccn_name_comp_get(content_name->buf, components,lsa_position+2,&lsid, &comp_size);
 		ls_id=atoi((char *)lsid);
 		res=ccn_name_comp_get(content_name->buf, components,lsa_position+3,&origtime, &comp_size);
 		get_name_part(orig_router,content_name,components,3);
-		printf("Ls ID: %s\nOrig Time: %s\nOrig Router: %s\n",lsid,origtime,orig_router->name);
 
-		int is_new_name_lsa=check_is_new_name_lsa(orig_router->name,(char *)lst,(char *)lsid,(char *)origtime);
-		if ( is_new_name_lsa == 1 )
+		int lsa_life_time=get_time_diff(time_stamp,(char *)origtime);
+
+		//printf("Ls ID: %s\nOrig Time: %s\nOrig Router: %s\n",lsid,origtime,orig_router->name);
+
+		if ( (strcmp((char *)orig_router,nlsr->router_name) == 0 && lsa_life_time < nlsr->lsa_refresh_time) || (strcmp((char *)orig_router,nlsr->router_name) != 0 && lsa_life_time < nlsr->router_dead_interval) )
 		{
-			printf("New NAME LSA.....\n");	
-			char *content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
-			printf("Content Data: %s \n",content_data);
+			int is_new_name_lsa=check_is_new_name_lsa(orig_router->name,(char *)lst,(char *)lsid,(char *)origtime);
+			if ( is_new_name_lsa == 1 )
+			{
+				printf("New NAME LSA.....\n");	
+				char *content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
+				printf("Content Data: %s \n",content_data);
+				process_incoming_sync_content_lsa(content_data);
+			}
+			else 
+			{
+				printf("Name LSA / Newer Name LSA already xists in LSDB\n");
+				char *content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
+				printf("Content Data: %s \n",content_data);
+			}
 		}
 		else 
 		{
-			printf("Name LSA / Newer Name LSA already xists in LSDB\n");
-			char *content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
-			printf("Content Data: %s \n",content_data);
+			printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
 		}
 	}
 	else if(ls_type == LS_TYPE_ADJ)
@@ -224,22 +336,33 @@
 		res=ccn_name_comp_get(content_name->buf, components,lsa_position+2,&origtime, &comp_size);
 		get_name_part(orig_router,content_name,components,2);
 		printf("Orig Time: %s\nOrig Router: %s\n",origtime,orig_router->name);
-	
-		int is_new_adj_lsa=check_is_new_adj_lsa(orig_router->name,(char *)lst,(char *)origtime);
-		if ( is_new_adj_lsa == 1 )
-		{
-			printf("New Adj LSA.....\n");	
-			char *content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
-			printf("Content Data: %s \n",content_data);			
-		}
-		else
-		{
 
-			printf("Adj LSA / Newer Adj LSA already exists in LSDB\n");
-			char *content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
-			printf("Content Data: %s \n",content_data);
-		}
+		int lsa_life_time=get_time_diff(time_stamp,(char *)origtime);
 
+		//printf("Ls ID: %s\nOrig Time: %s\nOrig Router: %s\n",lsid,origtime,orig_router->name);
+
+		if ( (strcmp((char *)orig_router,nlsr->router_name) == 0 && lsa_life_time < nlsr->lsa_refresh_time) || (strcmp((char *)orig_router,nlsr->router_name) != 0 && lsa_life_time < nlsr->router_dead_interval) )	
+		{
+			int is_new_adj_lsa=check_is_new_adj_lsa(orig_router->name,(char *)lst,(char *)origtime);
+			if ( is_new_adj_lsa == 1 )
+			{
+				printf("New Adj LSA.....\n");	
+				char *content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
+				printf("Content Data: %s \n",content_data);
+				process_incoming_sync_content_lsa(content_data);			
+			}
+			else
+			{
+
+				printf("Adj LSA / Newer Adj LSA already exists in LSDB\n");
+				char *content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
+				printf("Content Data: %s \n",content_data);
+			}
+		}
+		else 
+		{
+			printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
+		}
 	}
 
 	ccn_charbuf_destroy(&uri);
