add factory method to build polynomials from strings