adding ExitListener