sort priorities