apply transform function