write pretty-printing routine
(#6)