set grids and extent