g3: update according to tree