push notification refactoring