general structure to manage monte carlo jobs