added quit functinality