added quit functionality