prepare the result with the pagination options