make code prettify asynchronous