updated the autocomplete code.