implement the function comparing polynomials