Add pagination sort helper + sort functionality to mongodb