changes on generateMap method