Refactored getWeightClassIds() method