extract method for notification messages