Changed RST vars
Fixed R to get correct vales of p2 and q2, changed array_op function to correctly add diff length arrays
split p and q into separate arrays before working with them.