add exit evetn