reordering conditional for clarity and to make the next commit easier