rewriting using guide