Switching to "switch" instead of "if"