refactory in test suite.