simplify the test code