Modifications
Change the next_index finder