add support for sum and aggregate.