add support for foreach statement