new function poly2beta