20140703-2

automatic detect the iteration-stop condition