replace 'for' with 'forEach'