added notify function