refactored Notification.java