networking stuff

untested code. will not work, I think.