debug
add stopping rule ESS