first approach to parallelize computation of pi. not finished