modify for foreach statement and new expression