note: replace forEach with raw for loop