Add curve-fit using least square algorithm