new update, mainly the tree traverse