sorted out the monte carlo example