Use plain for loop instead of forEach