refine create connection