changed the all case to use the single-map case