some changes to xml generation