finished list sorting alg.