Autocomplete working with db