looping through array and printing items