notification logic