Added previous and next button in pagination