Working self balancing binary search tree