added max iterations to pollard rho