modify ordering of quadratic and binomial roots