cross validation code plus more informative printouts