added pagination to the views