refactored complex query taking advantage of the MultiSelect class provided by clld