Use for loops instead of .forEach for some perf gains