TypeAhead function to fix slow typeahead