hooking up notifications, refactoring