refactor before supporting notifications