added function to make xml