made some adjustments to random.v's polynomial