added replaceable transform function