add hook for aggregate