refator code
modify the testcase