reimplemented the old network stuff while also refactoring