add montecarlo algorithm