adding pagination to the homepage