Make mtransform a plain function