estimation of pi code