adding grid search