adding pagination to home page