Added curve fitting for polynomial approach