turn type modifiers into enum