fix iterNodes() and build()
- read in tree
- bug in tree read order