wip: move logic into helpers (notifications api)