changing listener termination method