subgraph, show refactoring