renamed cross_validation to generate_folds in comm and wrappers