add Hu logic, test case for valid Chi and index