Turning the train around at the end of the line