Use a set instead of a list when returning matches