rewrote transformation functions in set example