changed egrid to be contiguous