refine connection