Added a function to find the connections.