don't iterate over subParsesByCountry twice. you can do

subParsesByCountry.foreach({case (cc, parses) => {}})