move notification code to static method