added the polyNew function, which is just a modification of the ordinary poly function