updated map parsing script