Simplified my if/else switch statement