adding pagination to index