added paginate_by setting