rewriting tests