added quit callback