Changing if/else to switch