refactor test_helper