slight modification in the constructor of MonteCarlo.