before refactoring networking