adding subtree queries