Corrected computation of rho. not working entirely, but results are better