refactoring after test framework