putting pagination in another class

NOT yet finished