improve pretty_print()