working with typeahead.js