#62 freeing the Monte Carlo reduce function