added the monomorphic version of calcGroebnerBasis