refine function pass