Basic pagination
Changed database to mongodb