refactor test.