moved defined_enums access into a variable