Added grid search for 1 dim scenario