add enum_to_int/2 and int_to_enum/2