added case negativeRatio == positiveRatio