trying a foreach instead of listen