working clicking on prev and next pages