refine output format