added check if we have internet connection