paginate added for retrieve_result