validate a balanced tree