some changes in modgcd()
implement modular GCD algoritm for polynomials in Z[x0, ..., x{k-1}]