generalized monte carlo finally works