refactoring: replace all enum with class enum