onNotification to global scope