logic for adding page and pageSize param corrected