modifyng tree structure