Added a transform function