autocompletion works
half refactored autocompletion