remove unnecessary code.
refactoring testcases.