reordered treeContent array to match treeStructure