Switched to forEach() when looping over arrays