added monte carlo sim and marginals