Added changeRootByVal() and changeRootByRef()