Rewriting ffg