uses foreach closes #1