initial work on xml writing