implementing presenter's to_xml and to_json