update the sibling pointers in tree