added working exit