new curve fitting analysis, vectorized