binary search tree implemented in scala