working on CreateTree()