add foreach instruction