On the inside of the roof, right over the stove or closely nearby, the stove pipe fit into a slighly larger pipe that the smoke stack was part of. The idea was to gain draft for the stove without removing all of the oxygen from the caboose. It also moved and could expand when the caboose was moving.