*added pagination logic and default pages