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