Work in progress on grid search