updated version
added handling for retryable network conditions (fixes #6)