go back to foreach for older compilers