rehashing done with testcases.