Added f(ind) function.