Updated getSingleWeightTotal() function