beautify code slightly