adding pagination to homepage