Basic aggregation functionality

Basic aggregation functionality