Script to calculate pi - kind of works