refactoring, change some enum classes to enums