modified so won't quit if can't connect in 4 seconds