this seems odd/wrong - it just grabs the first mapping it finds and uses that as a mapping for all domains? (don't have full context here so might just need that)