simplify sorting values