move notification grouping to model