swap case to if/else