adding click on page number to view page functionality