Implementing Monte Carlo integration to calculate Pi