beautify and fix