rewrite tests structure