concurrent and sort alg