added pagination to index page