second try to implement typeahead