removed unneeded code added definitions for time interval to recheck connection when there is no internet