updated network logic