better handling of notifications