some small edits
more for 3.1, and move that substitution around and typeset it