add aggregate capability to BaseModel