Implemented type class for transforming objects