some problems with learning termination rule