tree transform