Adding threaded version of gridsearch. Code is untested to avoid
conflict with currently running program