add aggregateToMap method