refactored notification service