update test cases, add bfs print for tree debug