adding missing exit function.