Added looping over sets.