slight network refactoring