grid search improvments