exit functions added