Made isConnectionAvailable method