getLoop() added to TrainState