rewrite compelte