walk the tree with a Visitor rather than a Listener