network selection refactor