cross validator refactoring