implementing notify method