updated code to check for uniform dist. when multiplying nonquadratic residues with jacobi symbol 1 by quadratic residues