Replaced hard coded list by ranging over the map.