refactored regression test method