added exit on finish