Changed to forEach functions