refactoring test runner code
more refactoring
refactored code