switch from a map to a forEach