new scratch grid search algorithms.