replaced a raw integer into enum value.