added pagination to views