Complete sorting