updated array and for loop document