adding exit code to quit