added xml-serialize and write to disk methods