forEach substituted by a for loop

Signed-off-by: Ralf Koller <r.koller@gmail.com>