beautify some code