refactor, extract notifications into a module