refine output