added templating to typeahead