changed termination sequence