wagon_sort.rb modif