balance tree implemented.