cleaned up example for getConnectingEdges