set intersection seems better for the job