iterator
construct binary tree