change termination condition