worked on the binary search tree algorithm