fixed transform function