Upgraded to foreach