added clean exit