Correct pi_sqrty and z formulas