Sorting, version 2 (smooth transition)