subgraph traversal