separated map generation out of Map