improved exit function