changed countConnections to findShortestPath