printByGainLoss() working