test for exit