Refactored code to use enum