moving change root functionality from Tree to RBTree
moving change root functionality from Tree to RBTree