updated parsing for xml