fixed the tree structrue