refine test case; refactor indexer