change the first for to forEach