reformat and setup for xml marshalling