better handling of enums