updated parsing script