refactored test harness