refine output rules