Function firstIndexAsync