added a notify hook