created prettify method