reformat if statement