needs testing on unreliable network, otherwise almost ready