added quit statements