use stochastic optimization (random search) instead of random sampling