implement division and gcd on polynomials