refactor type_function
refactor type_enum