tonight final code still need to traverse the tree