scaled montecarlo() for in-line and batch modes