refactored test runner