Refactoring switch statement to if/else chain