make cross-validation optional