move from hg
added transform function