modified curve_simp