add function for quit button