passed tests rewrite