changes in class.pagination

changes in class.pagination, change for migration of mysql db  queries
to mongo in progress