exit code function updates