finished the quit method