Edited to create well formed xml