build a tree.

TODO: add check-status and id and class to each tree node.