removed exit code from exit function