use forEach instead of map