complete sort