the framework add exit condition