add -gain_only and -loss_only flags