finally got something right, now output need to be xml