Update the binary search tree