tried to use generics between bernstein and polynomial, but didn't understand how. using "become" method instead to copy the polynomial data into the bernstein object