implemented typeahead in frontend