update test cases
refactoring.