Good version without multimap