Adding functionality to analyze subsets of the graph