moved map generation functions to new file