refactor type_enum