moved more fn's out of grid_fit()