added a notify function to the client