using for each to loop through array items