beautify if statement