add "quit" function

does what you think