improve cross validation option in train_model()