need to work out how to get the autocomplete to register in the javascript