got environments to work for montecarlo()