change items to pages in array