implemented the transformation