Add support for grouping, use multimaps