partial aggregation function implemented