add exit method to response to exit button