create pretty_print function