working on detecting internet connection