end demo when 'quit' button is clicked