Added next and previous page functionality as buttons