small changes to train-model.perl