added a utility function to the autocompleter