Added train_model