changes for foreach statement