add some assertions for this, to make sure the XML is correct