polynomial gen