combine sort and order attempt

further cleanup