Rearranged order of if/else