fix aggregation to accept a pair(CLASSIFICATION, DISTRIBUTION) instead of DOUBLE