add pagination to main page