adding BFS subtree query