implemented the leave notification