modify 'CheckConnectivity()' method