using promise to request data for typeahead