now retries up to three times if a ping fails