change foreach statement's grammar