based on wp_beautifier