refactor all test