refine output.