beautify before output