Made updateTree function void, and removed an unnecessary recursive call