added return_subgrid.m