big refactoring of completions