initial autocomplete function