Create diferent method for sorting with pagination and without