notify function written