refactor enums in descriptor into a seperate object