computing integral with Monte Carlo method