fixed  output; added text/xml content-type header