add maggregate support