[impl]
sorted except for edge cases