rewrite test cases