major sorting update