refine controller