changer for loop to forEach