added check internet connection