added simple sort option to paginate