Refactoring the way stas are aggregated