update autocomplete code