Added foreach statement