update notifier logic to reduce nesting