pretty_print now uses str.format