adding checkConnections