use a normal for loop instead of a forEach