tree restruct