added helper to check the internet connection