Swap switch for if/else