you can use `tree.iter()` to visit every node instead of having to recurse.