added parsing to xml document