Added a notify function to the decorator