fix transformation functions