properly fix sort()