better sorting of completions