Generalizing the map
fghm provided