modify "CheckConnectivity()' method