completes cross validation