converted test runner to external module pattern