to use TreeWalker