change head to head to use api for autocomplete