improvements to graph generation and intersection generation