refactored network