translate polynomials exercise helper