Made crossValidate function. Substituted it for benchmark in main.