PiEstimator with tests added