binary search tree in js