Port some foreach

2 jobs for master