support foreach statement