add pagination to main page,worked