Issue #74: Custom aggregation function