ensure index is passed initially