clean exit prototype