3 traversals for tree
3 traversals for tree