start of writing maps to xml