changed to totalGain.