Use for loops instead of _.forEach