added autocomplete mode