typeahead.js implementation