improved pretty-printer