Added SetReduction to simplify the squash logic