working on the JS to make autocomplete work