multimap-like functionality