balanceTree. not tested yet