Add FOREACH support