improve test cases, reverse the order of index