network runloop refactoring