map generation and parsing