updated code snipper for object notify