refactoring the polynomial field/ring operation examples