add to code that does exit