refactor term's completer