cleaned quit method