changed 2d index to allpages