more tweaks to the pretty print function