trying to make autocomplete script more robust