adding pagination to link index pages