fixed write usages of enums, added test for enum transformations