yet another improvement on map creation
-- adding the python version