quit functionality added