implementing charPoly