working asastochastic for counting settlement