Completed HW02 -- Aggregation (highly commented!)