buildgrid modifications for fits