making some headway with sort