refactor train_only, hopefully this is cleaner