Refactored Switch to Enum