refactor and fixed the original test case