built quit functionality in