Refactoring enum