extension for aggregate functions