added rule for quitting