added internet connectivity check