further work on montecarlo