refine meshsort.rb