refactoring prettify-expression