saves to xml

has issues due to unfinished code