functionality added

Now the next and prev page buttons are working