iterating over each item in the array