removed grid search, improved speed