Ct paginate

extract the `order` bit to the model layer