Added an weighted aggregation mode