autocomplete refactoring