first problem, balanced tree