adds beginning functionality to autocomplete search