added an iteration over the array