added automatic translation of enums in bith directions