on index of the if directive