added grid search tuning