added on if statement in the first_larger_ind