Refactor toMultimap