Add pi_approximation
Refactor pi_approximation