autocompletion final implementation