use for loop to iterate over net updates array and to add corresponding z values
Removed unnecessary brackets