Implemented transform method.