added factor rule for sum of squares polynomials