Remove duplicating code in train_one switch