Trying out grid search for parameter tuning