add paginate and sortBy