Implemented transform function