refactor enums