added ability to modify an existing tree