Added aggregation. Working pretty well so far