finished importance sampling for pi