add pagination to class and files