merge splines smoothly