added progress bar & check internet connection