rewrite test generators