renamed Subgraph to SubGraph to be consistent with naming in process/.