Added aggregate function.