alternate version of EnumByVal