Minor changes to branch conditions to switch from if/else