Adding notification logic