cross validation test, minor cleanup