tree graph transformation