can infer the correct type for map