turned GridSearch into a template