refactoring to seperate autocomplete from actionhandler