refactor notification