refine factory