add pagination to index