refactored notification to a model