implemented typeahead