parsing to polynomials for efficiency comparisons added