foreach instead of for