updated notify function