refactoring, improve test runner