grade sorter for hashes.