refactory

 	refactory,add testcase