Changes to majority category loop