reformat output