refactor(index): simplify cb assignment