refactor test runner