refactored the notifications create action