improvements to ci, plus eq_ci stopping rule