made n-fold cross-validation parallelizable