Gorellian sorting