handle method internet connection