updated code for the pagelinks changes