adding `subgraph' method