rewrite rgraphum