class for stochastic simulations