refactored NotificationsController