internet connection handling added