simplify the code that generates test cases