get data for each page, update pageStart and pageEnd