On the vertical distribution of carbon monoxide and methane in the stratosphere