reformat if for readability